summaryrefslogtreecommitdiff
path: root/source4/script/installmisc.sh
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-11-27 19:58:00 +1100
committerAndrew Tridgell <tridge@samba.org>2009-11-27 19:58:29 +1100
commite96f9a40ad46b8c08eaa81fde015dccc990388c5 (patch)
tree85ba9911e76fac6a4c917299c082d9c7aeef3abb /source4/script/installmisc.sh
parentd5240822a58bdc69d37aa4119bcae807a4e6b0b5 (diff)
downloadsamba-e96f9a40ad46b8c08eaa81fde015dccc990388c5.tar.gz
samba-e96f9a40ad46b8c08eaa81fde015dccc990388c5.tar.bz2
samba-e96f9a40ad46b8c08eaa81fde015dccc990388c5.zip
s4-install: old systems don't have sed -i
surprisingly, this failure came from SLES8. I didn't realise that the -i option was so new!
Diffstat (limited to 'source4/script/installmisc.sh')
-rwxr-xr-xsource4/script/installmisc.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh
index 7851d1f77d..cb618628b0 100755
--- a/source4/script/installmisc.sh
+++ b/source4/script/installmisc.sh
@@ -18,7 +18,10 @@ cd $SRCDIR || exit 1
fix_python_path() {
f="$1"
egrep 'sys.path.insert.*bin/python' $f > /dev/null && {
- sed -i "s|\(sys.path.insert.*\)bin/python\(.*\)$|\1$PYTHONDIR\2|g" $f || exit 1
+ # old systems don't have sed -i :-(
+ sed "s|\(sys.path.insert.*\)bin/python\(.*\)$|\1$PYTHONDIR\2|g" < $f > $f.$$ || exit 1
+ mv -f $f.$$ $f || exit 1
+ chmod +x $f
}
}