You are not logged in.
Banged some scripts together to update from ABS and sharing them cause I like them - they work together or separate.
gather abs directories into ~/abs directory:
#!/usr/bin/perl
my @upgradelist;
system ("sudo pacman -Sy");
system ("sudo abs");
open FH, "pacman -Qqu |";
while (<FH>){
chomp $_;
if (-d "/var/abs/core/$_") {system ("cp -R /var/abs/core/$_/ /home/poiuyt/abs/ ");}
if (-d "/var/abs/community/$_") {system ("cp -R /var/abs/community/$_/ /home/poiuyt/abs/ ");}
if (-d "/var/abs/extra/$_") {system ("cp -R /var/abs/extra/$_/ /home/poiuyt/abs/ ");}
}
DL and make the ABS packages from the ~/abs directory:
GNU nano 2.2.6 File: makepackages.pl
#!/usr/bin/perl
$absdir = $ENV{"HOME"}."/abs";
opendir (DIR, $absdir);
my @directory= readdir(DIR);
my $workingdir;
foreach (@directory){
# if ($file =~ m/^\./){
$workingdir = $absdir."/$_";
print "calling makepkg on $workingdir\n";
chdir ("$workingdir") or die "can't change directories";
system ("makepkg");
}
# }
install packages in abs directory:
GNU nano 2.2.6 File: install.pl
#!/usr/bin/perl
$absdir = $ENV{"HOME"}."/abs";
opendir (DIR, $absdir);
my @directory= readdir(DIR);
my $workingdir;
foreach (@directory){
# if ($file =~ m/^\./){
$workingdir = $absdir."/$_";
print "calling pacman on $workingdir\n";
chdir ("$workingdir") or die "can't change directories";
system ("sudo pacman -U *.pkg.tar.xz");
}
# }
Feel free to comment or improve as I willingly admit I am a crappy coder.
EDIT : My bad code was corrected - sorry was working on it today
Last edited by poiuyt23 (2013-12-17 05:35:21)
Offline
Moving to Programming and Scripting...
Offline
Don't use pacman -Sy, use checkupdates
Don't run abs as root, use $ABSROOT, also you cam tell abs just what packages to download. As a sidenote, abs is often out of date, the gir repo is prefered.
And there already are several existing tools to build/update from abs, why not use one of those?
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
If you do use ABSROOT, you can just set it to your ~/abs directory so the first script would not be needed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
, abs is often out of date, the gir repo is prefered.
Are you talking about this?
Offline
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
I see. So instead of keeping the PKGBUILDs up to date with 'sudo abs', we would issue a 'git pull' instead. OK.
But it looks like this git repo is missing several packages from the official Arch repos, like calibre and dwm (these two are present in the ABS tree, under community).
Offline
There is a seperate repo for community, just click on the source link from the package page.
Last edited by Mr.Elendig (2013-12-28 17:23:45)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
I will have to take a look at all the suggestions made - the main reason I started this is because I was new to Arch and didn't (and still don't) know all the tools available.
Offline