Bläddra i källkod

small updates to packager

* popufare specific (non-legacy)
* gives more verbose output to better facilitate `update_level` table insertions
* bypasses local compilation for DIU install script (option that can
  be set for future versions if need be)
abetusk 4 år sedan
förälder
incheckning
88a60e8b92
2 ändrade filer med 14 tillägg och 6 borttagningar
  1. 11 5
      busunit/scripts/package_install.sh
  2. 3 1
      server/diu_packager/create_popufare_package.sh

+ 11 - 5
busunit/scripts/package_install.sh

@@ -20,6 +20,8 @@
 
 echo "# Popufare DIU package installer script"
 
+COMPILELOCAL=0
+
 tarball="package.tgz"
 
 BINDIR="/home/bus/bin"
@@ -48,7 +50,9 @@ pushd $tmpdir > /dev/null
     exit 1
   fi
 
-  ./build_all.sh native
+  if [[ "$COMPILELOCAL" == 1 ]] ; then
+    ./build_all.sh native
+  fi
 
   # These represent the most common files that are going to need to be
   # updated.
@@ -83,10 +87,12 @@ pushd $tmpdir > /dev/null
 
   # install site specific files
   #
-  for fn in `find site -type f` ; do
-    dstfn=`echo $fn | sed 's;^site;;'`
-    cp -L $fn $dstfn
-  done
+  if [[ -e site ]] ; then
+    for fn in `find site -type f` ; do
+      dstfn=`echo $fn | sed 's;^site;;'`
+      cp -L $fn $dstfn
+    done
+  fi
 
 popd > /dev/null
 

+ 3 - 1
server/diu_packager/create_popufare_package.sh

@@ -18,7 +18,7 @@
 # along with PopuFare.  If not, see <https://www.gnu.org/licenses/>.
 #
 
-VERBOSE=0
+VERBOSE=1
 
 mkdir -p stage
 mkdir -p package
@@ -64,6 +64,8 @@ fi
 
 if [[ "$VERBOSE" == 1 ]] ; then
   echo "# putting package '$pkgfile' in ./package"
+  echo "# package information:"
+  echo '# (0, "package.tgz", "'`md5sum stage/$pkgfile | cut -f1 -d' '`'", '`wc -c stage/$pkgfile | cut -f1 -d" "`', "/home/bus/package/'$pkgfile'", "'$pkgver'")'
 fi
 
 mv stage/$pkgfile package