#!/bin/bash # make a distribution package for the Audrey # mru 20030111.0 pjf@cape.com if [ $# -eq 0 ] then echo "usage: make-a-pkg (name)" exit fi # make sure we have an install dir and root echo "Checking if the structure is ok" echo "verifying the install script is in there" if [ -e ./install/ ] ; then # and we have an install script if [ ! -e ./install/install ] ; then echo " install script file missing " exit fi echo " found ...........and the root too" # as well as a root structure (can be empty) if [ ! -e ./install/root/ ] ; then echo " .. sorry Root structure not found " exit fi else echo " Installation Structure or install file missing " exit fi echo "Package contents look good ........................" # package the structure echo "Tarring the install structure" tar -c ./install/* > ./tall.tar echo " and gzipping it up" gzip ./tall.tar # Add the sizing in the head script so we can # have tail extract the archive ls -l ./tall.tar.gz | cut -b35-42 > size s=`more ./size` more ./pack-head | sed s/9999999/"$s"/ > ./pak-head rm ./size # finish the package up echo "Making the distro package $1" cat ./pak-head ./tall.tar.gz > ./$1 rm ./tall.tar.gz ./pak-head chmod +x $1 echo "... Thats all folks, $1 packaged to go ..."