Added code to abort makepkg.sh if binaries missing.
authorShirish Kalele <kalele@samba.org>
Wed, 12 Apr 2000 00:37:51 +0000 (00:37 +0000)
committerShirish Kalele <kalele@samba.org>
Wed, 12 Apr 2000 00:37:51 +0000 (00:37 +0000)
packaging/Solaris/makepkg.sh

index 6fa182bd142c479856a6a05ab7b33f2666d8fa31..5e379dd332a580309bafebf44e0c5d5257e9a4f5 100755 (executable)
@@ -19,7 +19,7 @@ add_dynamic_entries()
   # Check if make_smbcodepage exists
   if [ ! -f $DISTR_BASE/source/bin/make_smbcodepage ]; then
     echo "Could not find $DISTR_BASE/source/bin/make_smbcodepage to generate codepages.\n\
-     Please create the binaries before packaging." >&2
+Please create the binaries before packaging." >&2
     exit 1
   fi
 
@@ -115,7 +115,7 @@ then
        # Try to guess the distribution base..
        CURR_DIR=`pwd`
        DISTR_BASE=`echo $CURR_DIR | sed 's|\(.*\)/packaging.*|\1|'`
-       echo "Assuming Samba distribution is rooted at $DISTR_BASE.."
+       echo "Assuming Samba build tree rooted at $DISTR_BASE.."
 else
        DISTR_BASE=$1
 fi
@@ -143,6 +143,8 @@ cp static_prototype prototype
 # Add the dynamic part to the prototype file
 (add_dynamic_entries >> prototype)
 
+[ $? != 0 ] && exit 1
+
 # Create the package
 pkgmk -o -d /tmp -b $DISTR_BASE -f prototype
 if [ $? = 0 ]