Skip to content

Commit 7e55a0a

Browse files
Fix derived dependencies
1 parent 86a149a commit 7e55a0a

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

houseinstall.sh

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,34 @@ forceupdate=0
2828
GITHUB="https://github.com/pascal-fb-martin"
2929

3030
function 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

5756
projects=$*
5857
if [[ "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-
6759
install housebuild 1
6860
if [[ $forceupdate -eq 1 ]] ; then
6961
echo "====== Reloading $0"

0 commit comments

Comments
 (0)