summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetup_env.sh23
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