diff options
author | James Crompton | 2021-08-01 22:56:29 +0200 |
---|---|---|
committer | James Crompton | 2021-08-01 22:56:29 +0200 |
commit | 5cd8f5e60e744bdf3041e76eda8ed3a54dec153d (patch) | |
tree | 15e9d14babf4eda26fa63e47df24a9e4ae2e8ec9 /updater.pl | |
parent | 372d084baec2fffa134b7df21575d014b8e29343 (diff) | |
download | aur-5cd8f5e60e744bdf3041e76eda8ed3a54dec153d.tar.gz |
More flexibility for easier packaging of other application variants
Diffstat (limited to 'updater.pl')
-rw-r--r-- | updater.pl | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/updater.pl b/updater.pl index 06ed9f05abd9..f00007e81f9e 100644 --- a/updater.pl +++ b/updater.pl @@ -7,23 +7,18 @@ use strict; use Getopt::Long; my $installer = ""; - GetOptions("installer=s" => \$installer); -unless ($installer =~ /(CEWE_Fotowelt|Mein_CEWE_FOTOBUCH)/){ - print "\033[1;31mNo AUR package available for this update ('$installer').\033[0m" -}else{ - - my $pkgName = $1 eq 'Mein_CEWE_FOTOBUCH' ? 'cewe-fotobuch' : 'cewe-fotowelt'; +chdir("/tmp"); +system("wget https://aur.archlinux.org/cgit/aur.git/snapshot/cewe-fotowelt.tar.gz -O cewe-fotowelt.tar.gz"); +system("tar -xf cewe-fotowelt.tar.gz"); - chdir('/tmp'); - system("wget https://aur.archlinux.org/cgit/aur.git/snapshot/$pkgName.tar.gz -O $pkgName.tar.gz"); - system("tar -xvf $pkgName.tar.gz"); +system("mv cewe-fotowelt cewe-software"); +chdir("cewe-software"); - chdir($pkgName); - system("mv '$installer' ./"); - system('_UPDATING=1 makepkg --install --clean --skipchecksums'); -} +system("mv '$installer' ./"); +$installer =~ s!.*/!!; +system("_UPDATING=1 _SETUP_FILE=$installer _RENAME='APPLICATION NAME' makepkg --install --noconfirm --clean"); -print "\nDrücken Sie <ENTER> um dieses Fenster zu schließen.\n"; +print "\nHit <ENTER> to close this window.\n"; my $input = <STDIN>; |