summarylogtreecommitdiffstats
path: root/updater.pl
diff options
context:
space:
mode:
authorJames Crompton2018-04-01 13:04:48 +0200
committerJames Crompton2018-04-01 15:30:42 +0200
commit9d315fc3d0979029d9664f1e81f9fedff70a1c2c (patch)
tree599b851707bd660584f622ae3b53c78ec88430bd /updater.pl
parent4fe6d1923e09572a230792831c40fa0ac22a24a7 (diff)
downloadaur-9d315fc3d0979029d9664f1e81f9fedff70a1c2c.tar.gz
Don't wait for confirmation after saying nothing. Improved update/upgrade script.
Diffstat (limited to 'updater.pl')
-rw-r--r--updater.pl23
1 files changed, 13 insertions, 10 deletions
diff --git a/updater.pl b/updater.pl
index 26dfaa430d0b..2fb5a9d80c7f 100644
--- a/updater.pl
+++ b/updater.pl
@@ -10,17 +10,20 @@ my $installer = "";
GetOptions("installer=s" => \$installer);
-die "\033[1;31mNo AUR package available for this update.\033[0m"
- unless $installer =~ /(OnlineFotoservice|Mein_CEWE_FOTOBUCH)/;
+unless ($installer =~ /(cewe-fotoservice|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-fotoservice';
+ my $pkgName = $1 eq 'Mein_CEWE_FOTOBUCH' ? 'cewe-fotobuch' : 'cewe-fotoservice';
-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");
+ 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");
-chdir($pkgName);
-system("mv '$installer' ./");
-system('_UPDATING=1 makepkg --install --clean --skipchecksums');
+ chdir($pkgName);
+ system("mv '$installer' ./");
+ system('_UPDATING=1 makepkg --install --clean --skipchecksums');
+}
-print "\nSie können dieses Fenster jetzt schließen.\n";
+print "\nDrücken Sie <ENTER> um dieses Fenster zu schließen.\n";
+my $input = <STDIN>;