#!/bin/sh ## ## SCRIPT: 01_targzip_feXpgDirectories.sh ## ## PURPOSE: Makes a tar.gz file from a set of application files --- ## in this case, from a set of DEVELOPMENT directories of ## 'xpg' FE subsystem files that are destined to be put ## in a user's ## $HOME/apps/feXpg_yyyymmmdd ## directory. ## ## *********!! CHANGE THE HARD-CODED DATE BELOW, TO WHAT YOU WANT IT TO BE, ## *********!! BEFORE RUNNING THIS SCRIPT. ## ## HOW TO USE: Best for the 'package'-making-person to run this script ## in a terminal. The person can run from his home directory ## because this script should 'cd' to the proper directory ## to do the tar and gzip commands. ## ## Or run in the TARDIR, defined below. ## ## ** NOTE **: Tailor the 2 DIR vars (FROMDIR and TARDIR) and the 'tar' ## command below to suit the file structure of this application. ## ## We put the output '.tar.gz' file into the TARDIR directory ## --- the directory where the tar script(s) reside. ## ## Started: 2010may02 for NautilusScriptsFE system. ## Changed: 2010aug27 Tailored dir names according to the 'xpg' system ## ready-to-release files being in the author's ## $HOME/apps/feXpg directory. ## Changed: 2010sep03 Added 'includes_sh' dir to the tar. ## Changed: 2010sep07 Added '--exclude=".PREP"' to the tar. ## Changed: 2011may28 Added '--exclude=".TEST"' to the tar. ######################################################### ## Set the FROMDIR and TARDIR vars --- and setup the 'tar' ## command below properly. ######################################################### FROMDIR="$HOME/apps/feXpg" TARDIR="$FROMDIR/.TAR_xpg" ## FOR TESTING: (show statements as they execute) set -x ############################################## ## 'cd' to the directory containing the ## application files --- in this case, ## the FE 'xpg' DEVELOPMENT Directory. ############################################## cd "$FROMDIR" ##******************************************** ## Make the tar file from the app files. ## !!!CHANGE THIS DATE FOR A NEW RELEASE!!! ##******************************************** TARFILE="$TARDIR/xpg_2011oct05.tar" tar -cvf "$TARFILE" \ --exclude=".bkup*" \ --exclude=".PREP*" \ --exclude=".TEST*" \ --exclude=".TAR*" \ helps/ \ includes_sh/ \ includes_tk/ \ scripts/ \ tkGUIs/ \ set_fedir_vars.shi \ set_fedir_vars.tki \ xpg_shofil_PKG.txt ############################################## ## Make the gzip (.gz) file from the tar file. ############################################## gzip "$TARFILE" ############################################## ## Indicate where the tar file is and its name. ############################################## echo " ############################ The tar file was created in $TARFILE It should have a '.gz' suffix. ############################# " ############################################# ## CHECK THE CONTENTS OF THE TAR-GZIPPED FILE ## --- using 'tar ztvf'. ############################################# OUTLIST="/tmp/temp_tarTOC.lis" tar ztvf "${TARFILE}.gz" > "$OUTLIST" gedit "$OUTLIST"