Browse files

Cleanup how we locate the PROGDIR and set PDESTDIR* variables

  • Loading branch information...
1 parent 16a26df commit ce5c92ff561dc41c3f0f6c22c3b491164b0acaca @kmoore134 kmoore134 committed Nov 18, 2013
Showing with 27 additions and 31 deletions.
  1. +6 −10 scripts/1.createworld.sh
  2. +5 −10 scripts/9.3.makedvd.sh
  3. +9 −4 scripts/9.freesbie.sh
  4. +3 −3 scripts/build-iso.sh
  5. +2 −2 scripts/menu.sh
  6. +2 −2 scripts/portbuild.sh
View
16 scripts/1.createworld.sh
@@ -1,16 +1,12 @@
#!/bin/sh
-# Check if we have sourced the variables yet
-if [ "${PDESTDIR}" = "" ]
-then
- . ../pcbsd.cfg
-fi
+# Where is the pcbsd-build program installed
+PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR
-if [ -z ${PDESTDIR} ]
-then
- echo "ERROR: PDESTDIR is still unset!"
- exit 1
-fi
+# Source the config file
+. ${PROGDIR}/pcbsd.cfg
+
+cd ${PROGDIR}/scripts
# Source our functions
. ${PROGDIR}/scripts/functions.sh
View
15 scripts/9.3.makedvd.sh
@@ -4,18 +4,13 @@
# Copyright: 2010 PC-BSD Software / iXsystems
############################################################################
-# Check if we have sourced the variables yet
-if [ -z $PDESTDIR ]
-then
- . ../pcbsd.cfg
-fi
+# Where is the pcbsd-build program installed
+PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR
+# Source the config file
+. ${PROGDIR}/pcbsd.cfg
-if [ -z ${PDESTDIR} ]
-then
- echo "ERROR: PDESTDIR is still unset!"
- exit 1
-fi
+cd ${PROGDIR}/scripts
# Source our functions
. ${PROGDIR}/scripts/functions.sh
View
13 scripts/9.freesbie.sh
@@ -3,14 +3,19 @@
# Description: Creates the ISO file
# Copyright: 2009 PC-BSD Software / iXsystems
############################################################################
-# Check if we have sourced the variables yet
-if [ -z $PDESTDIR ]; then
- . ../pcbsd.cfg
-fi
+
+# Where is the pcbsd-build program installed
+PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR
+
+# Source the config file
+. ${PROGDIR}/pcbsd.cfg
+
+cd ${PROGDIR}/scripts
# Source our functions
. ${PROGDIR}/scripts/functions.sh
+
if [ ! -d "${GITBRANCH}" ] ; then
rc_halt "git clone ${GITPCBSDURL} ${GITBRANCH}"
else
View
6 scripts/build-iso.sh
@@ -15,11 +15,11 @@ if [ ! -e "${PROGDIR}/pkg-pubkey.cert.dist" ] ; then
cp ${PROGDIR}/pkg-pubkey.cert.dist ${PROGDIR}/pkg-pubkey.cert
fi
-# Source the config file
-. ../pcbsd.cfg
-
cd ${PROGDIR}/scripts
+# Source the config file
+. ${PROGDIR}/pcbsd.cfg
+
# First, lets check if we have all the required programs to build an ISO
. ${PROGDIR}/scripts/functions.sh
View
4 scripts/menu.sh
@@ -4,11 +4,11 @@
PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR
# Source the config file
-. ../pcbsd.cfg
+. ${PROGDIR}/pcbsd.cfg
cd ${PROGDIR}/scripts
-# First, lets check if we have all the required programs to build an ISO
+# Source our functions
. ${PROGDIR}/scripts/functions.sh
# Check requirements
View
4 scripts/portbuild.sh
@@ -6,11 +6,11 @@
PROGDIR="`realpath | sed 's|/scripts||g'`" ; export PROGDIR
# Source the config file
-. ../pcbsd.cfg
+. ${PROGDIR}/pcbsd.cfg
cd ${PROGDIR}/scripts
-# First, lets check if we have all the required programs to build an ISO
+# Source our functions
. ${PROGDIR}/scripts/functions.sh
# Check if we have required programs

0 comments on commit ce5c92f

Please sign in to comment.