Created
November 19, 2012 21:53
-
-
Save waffle2k/4114281 to your computer and use it in GitHub Desktop.
Install the latest package given the script get_latest.pl exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# | |
function die | |
{ | |
echo "$1" | |
exit 1 | |
} | |
get_latest.pl $1 | | |
while read PACKAGE | |
do | |
cd /tmp | |
wget $PACKAGE || die 'Could not get package' | |
FN=$(echo $PACKAGE | awk -F\/ '{print $NF}') | |
tar zxpvf $FN | |
D=$(echo $FN | awk -F '.tar.gz' '{print $1}') | |
cd $D || die "Could not cd to $D" | |
perl Makefile.PL && sudo make install | |
cd .. | |
sudo rm -rf $FN $D | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment