summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-04 23:25:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:55 -0500
commitb1fed47440717a68368430f4571134d2102afb66 (patch)
treef2d7b7b3c7c5c0caa3303b13cf75d1e5bb627f06
parent2b1760297f3c61aa5f71fc548c51dae8de3cc885 (diff)
downloadsamba-b1fed47440717a68368430f4571134d2102afb66.tar.gz
samba-b1fed47440717a68368430f4571134d2102afb66.tar.bz2
samba-b1fed47440717a68368430f4571134d2102afb66.zip
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)
-rwxr-xr-xsource3/script/installswat.sh10
1 files changed, 7 insertions, 3 deletions
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