File tree Expand file tree Collapse file tree 1 file changed +16
-24
lines changed
Expand file tree Collapse file tree 1 file changed +16
-24
lines changed Original file line number Diff line number Diff line change @@ -28,42 +28,34 @@ forceupdate=0
2828GITHUB=" https://github.com/pascal-fb-martin"
2929
3030function install () {
31- if [[ ${installed[$1]} = 0 ]] ; then
32- echo " === Checking $1 "
33- if [ -d $1 ] ; then
34- pushd $1 > /dev/null
35- git pull | grep -q ' Already up to date'
36- if [[ $? -ne 0 || $forceupdate -eq 1 ]] ; then
37- echo " ====== Updating $1 "
38- make rebuild
39- sudo make install
40- if [[ $2 -ne 0 ]] ; then forceupdate=1 ; fi
41- fi
42- else
43- echo " ====== Installing $1 "
44- git clone $GITHUB /$1 .git
45- pushd $1 > /dev/null
31+ if [[ -v installed[$1 ] ]] ; then return 0 ; fi
32+ echo " === Checking $1 "
33+ if [ -d $1 ] ; then
34+ pushd $1 > /dev/null
35+ git pull | grep -q ' Already up to date'
36+ if [[ $? -ne 0 || $forceupdate -eq 1 ]] ; then
37+ echo " ====== Updating $1 "
4638 make rebuild
4739 sudo make install
4840 if [[ $2 -ne 0 ]] ; then forceupdate=1 ; fi
4941 fi
50- popd > /dev/null
51- installed[$1 ]=1
42+ else
43+ echo " ====== Installing $1 "
44+ git clone $GITHUB /$1 .git
45+ pushd $1 > /dev/null
46+ make rebuild
47+ sudo make install
48+ if [[ $2 -ne 0 ]] ; then forceupdate=1 ; fi
5249 fi
50+ popd > /dev/null
51+ installed[$1 ]=1
5352}
5453
5554# Implicitely include common dependencies and accept short names:
5655
5756projects=$*
5857if [[ " x$1 " = " xupdate" ]] ; then projects=` ls` ; fi
5958
60- for s in $projects ; do
61- installed[$s ]=0
62- done
63- installed[housebuild]=0
64- installed[echttp]=0
65- installed[houseportal]=0
66-
6759install housebuild 1
6860if [[ $forceupdate -eq 1 ]] ; then
6961 echo " ====== Reloading $0 "
You can’t perform that action at this time.
0 commit comments