From aca490651e6f86d680db578d1dfdc1ce3e44f854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 22 Feb 2024 18:58:30 +0100 Subject: [PATCH] Initial commit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolás Ortega Froysa --- LICENSE | 17 ++++++++++++++++ README.md | 10 +++++++++ pacundo.pl | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100755 pacundo.pl diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b472728 --- /dev/null +++ b/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) [year] Nicolás A. Ortega Froysa + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c8eb9f0 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# pacundo + +You know those times when you install some ArchLinux upgrades and it breaks your +system, and now you have to go in and downgrade those packages? It's a pain +ain't it? Well, this should make it slightly less of a pain (you may still have +to boot from a USB depending on just how broken it is). + +## License + +This project is licensed under the terms & conditions of the Zlib license. diff --git a/pacundo.pl b/pacundo.pl new file mode 100755 index 0000000..d951297 --- /dev/null +++ b/pacundo.pl @@ -0,0 +1,60 @@ +#!/usr/bin/env perl + +# Copyright (C) 2024 Ortega Froysa, Nicolás All rights reserved. +# Author: Ortega Froysa, Nicolás +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source +# distribution. + +use strict; +use warnings; + +use Getopt::Std; + +my $VERSION = "1.0"; +my $PROG_NAME = "pacundo"; + +sub print_version { + print("$PROG_NAME v$VERSION\n"); +} + +sub print_help { + &print_version(); + print("A time machine to return your ArchLinux machine back to a working state.\n"); + print("\nUSAGE: + $PROG_NAME [-i|-r] + $PROG_NAME -h + $PROG_NAME -v + +OPTIONS: + -i Enter interactive mode to select packages to downgrade [default behavior] + -r Automatically downgrade all packages from last upgrade + -h Show this help information + -v Print program version\n"); +} + +getopts("irvh", \my %opts); + +if ($opts{'v'}) { + &print_version(); + exit 0; +} elsif ($opts{'h'}) { + &print_help(); + exit 0; +}