summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-27 10:03:29 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-27 10:03:29 +0200
commitf3cdc3eb8faae385bc044423996b764678730fce (patch)
tree25d125bacd9a06bd91a16a55886e847df0d4e327 /scripts
parent401a440863c54f8251837f9732f668cbf81e0df3 (diff)
make the sed fix darwin specific
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-rcconf11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/update-rcconf b/scripts/update-rcconf
index 8d2b912da..6bde04913 100755
--- a/scripts/update-rcconf
+++ b/scripts/update-rcconf
@@ -2,6 +2,13 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+os=$(uname)
+if [ "$os" = "Darwin" ]; then
+ sed="sed -i '' -e"
+else
+ sed="sed -i -e"
+fi
+
topdir=$(readlink -nf $(dirname $0)/.. 2>/dev/null || (cd $(dirname $0)/..; pwd -P))
. $topdir/.config
@@ -51,8 +58,8 @@ for service in $(grep ^ADK_RUNTIME_START_ $topdir/.config |grep -v ADK_RUNTIME_S
rcname=openssh
fi
if [ $mode = "m" ]; then
- sed -i "" -e "s#^$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf
+ $sed "s#^$rcname=\"NO\"#$rcname=\"DAEMON\"#" $rcconf
else
- sed -i "" -e "s#^$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf
+ $sed "s#^$rcname=\"NO\"#$rcname=\"YES\"#" $rcconf
fi
done