diff options
author | James Meyer <james.meyer@operamail.com> | 2008-10-28 15:46:51 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2008-10-28 15:46:51 (GMT) |
commit | 420e9d7c491e431cf531dcec98bc2ff8b7166936 (patch) | |
tree | f713dc4b0f43960b5ae3a072174dddd97d366c69 | |
parent | ab2849b21407d6753d6b5b800b9229ea1ee60b4a (diff) | |
download | linhes_dev-420e9d7c491e431cf531dcec98bc2ff8b7166936.zip |
Add support for pacman.static for i686.
if pacman is not found on the exisiting system, then it will download pacman-static from knoppmyth.net. After download is complete it will adjust the path to include the static version of pacman
-rwxr-xr-x | setup_env.sh | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/setup_env.sh b/setup_env.sh index ace578d..38083b6 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -33,19 +33,34 @@ fi } +function static-pacman { + echo "downloading pacman to tmp" + cd /tmp + wget http://www.knoppmyth.net/repo/$ARCH/pacman-static.tgz + status=$? + if [ ! $status = 0 ] + then + echo "couldn't download pacman static" + exit 1 + fi + tar -zxvf pacman-static.tgz + export PATH=$PATH:/tmp/pacman.static/run + cd - +} + function pacman_check { which pacman status=$? if [ ! $status = 0 ] then - echo "Can not find pacman in the path, please install pacman" - exit 1 - fi + echo "Can not find pacman in the path." + echo "Trying to use static version" + static-pacman +fi } - #----------------------------------------------- arg_check $1 $2 pacman_check |