diff options
author | James Crompton | 2016-03-07 09:42:51 +0100 |
---|---|---|
committer | James Crompton | 2016-03-08 22:34:01 +0100 |
commit | 5cbba62b5d33cc2e12c46d67ec8f7dd2271bf12c (patch) | |
tree | 63a6ca3841ac4ded7e45c2f55d8869be7ad2470e /updater.pl | |
parent | 66a0439e7cc53fb16d4e7cde1f62a42ceccfab51 (diff) | |
download | aur-5cbba62b5d33cc2e12c46d67ec8f7dd2271bf12c.tar.gz |
Allow for update from within application
Diffstat (limited to 'updater.pl')
-rw-r--r-- | updater.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/updater.pl b/updater.pl new file mode 100644 index 000000000000..ffa6a3fd3f8b --- /dev/null +++ b/updater.pl @@ -0,0 +1,25 @@ +#! /usr/bin/perl -w + +################################################################################ +# Replacement updater script for AUR package +################################################################################ +use strict; +use Getopt::Long; + +my $installer = ""; + +GetOptions("installer=s" => \$installer); + +die "\033[1;31mNo AUR package available for this update.\033[0m" + unless $installer =~ /(OnlineFotoservice|Mein_CEWE_FOTOBUCH)/; + +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($pkgName); +system('_UPDATING=1 makepkg --install --clean --skipchecksums'); + +print "\nSie können dieses Fenster jetzt schließen.\n"; |