Преглед на файлове

not failing on missing site directory

clementinecomputing преди 6 години
родител
ревизия
5f8abcd187
променени са 2 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 3 3
      server/diu_packager/README.md
  2. 6 1
      server/diu_packager/create_popufare_package.sh

+ 3 - 3
server/diu_packager/README.md

@@ -6,9 +6,9 @@ package ready for DIU deployment.
 
 There is a legacy system in place so the install script
 needs to be careful about how it interacts with the
-system so as not to interfere with a legacy system
-if one is detected but also do normal installation
-if we're on a newer Popufare system.
+target system.
+The install script should proceed nomrally if it detects a
+more recent 'Popufare' system and abort otherwise.
 
 This packager is meant mostly for reference.
 Site specific files will need to be added to the packager

+ 6 - 1
server/diu_packager/create_popufare_package.sh

@@ -26,6 +26,7 @@ mkdir -p package
 pkgver=`date '+%Y%m%d-%H-%M-%S'`
 
 DIUDIR=`realpath ../../busunit`
+SITEDIR="../../site"
 
 pkgfile="package-$pkgver.tgz"
 pkgdir="package-$pkgver"
@@ -45,7 +46,11 @@ pushd stage/$pkgdir > /dev/null
   # copy over site specific files that overwrite default
   # files.
   #
-  cp -L -R ../../site .
+  if [[ -d "$SITEDIR" ]] ; then
+    cp -L -R ../../site .
+  else
+    echo "# warning: no site specific directory found ($SITEDIR)"
+  fi
 
   tar -czf ../$pkgfile *