From 420e9d7c491e431cf531dcec98bc2ff8b7166936 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Tue, 28 Oct 2008 11:46:51 -0400 Subject: 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 --- setup_env.sh | 23 +++++++++++++++++++---- 1 file 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 -- cgit v0.12