From b1fed47440717a68368430f4571134d2102afb66 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 4 Jan 2007 23:25:04 +0000 Subject: r20535: Fix make install to work when root doesn't have write access into the source tree (like when your directory is nfs mounted for example....). Jeremy. (This used to be commit 7dcb61d1b2d08270a8c718328a26ef4866a1c500) --- source3/script/installswat.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index f4220b3c63..567bfa1a01 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -77,11 +77,15 @@ for ln in $LANGS; do echo $FNAME if test "$mode" = 'install'; then if [ "x$BOOKDIR" = "x" ]; then - cat $f | sed 's/@BOOKDIR@.*$//' > $f.tmp + cat $f | sed 's/@BOOKDIR@.*$//' > $FNAME.tmp else - cat $f | sed 's/@BOOKDIR@//' > $f.tmp + cat $f | sed 's/@BOOKDIR@//' > $FNAME.tmp fi - f=$f.tmp + if test ! -f "$FNAME.tmp"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + f=$FNAME.tmp cp "$f" "$FNAME" rm -f "$f" if test ! -f "$FNAME"; then -- cgit