summaryrefslogtreecommitdiff
path: root/packages/base-system
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-07-10 18:35:29 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2012-07-10 18:39:01 +0200
commita704889f725589ad168fac4292f0d8102d64df89 (patch)
tree7c4f6e4c48d004e2ff7f1b95a81a8febdeda98c1 /packages/base-system
parentccfd42ad2679c389980d7aaaf6eed8ec8e2cc591 (diff)
base-system: fix the preinstall script for clean installs
Diffstat (limited to 'packages/base-system')
-rwxr-xr-xpackages/base-system/preinstall6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/base-system/preinstall b/packages/base-system/preinstall
index 8c1b471..ee07c60 100755
--- a/packages/base-system/preinstall
+++ b/packages/base-system/preinstall
@@ -12,7 +12,7 @@ sudo pkgutil --regexp --forget base-system*
sudo pkgutil --forget osx-framework
sudo pkgutil --forget snappy
-if [ -L "$old_sdk" ]; then
+if [ -d "$old_sdk" ]; then
if [ -L "$old_sdk" ]; then
exit 0
else
@@ -21,8 +21,10 @@ if [ -L "$old_sdk" ]; then
fi
if [ ! -d "$new_sdk" ]; then
- sudo mkdir "$new_sdk"
+ sudo mkdir -p "$new_sdk"
fi
sudo rm -rf "$old_sdk"
sudo ln -s "$new_sdk" "$old_sdk"
+
+exit 0