#!/bin/sh ## ## SCRIPT: 01_targzip_feNautilusScriptDirectories.sh ## ## PURPOSE: Makes a tar.gz file from a set of application files --- ## in this case, from a set of directories of Nautilus Scripts ## that are destined to be put in a user's ## $HOME/.gnome2/nautilus-scripts ## directory. ## ## The resulting tar.gz file is to be used with the script ## 02_extractFromSelf_code_forCat2tarfile_ofNautScrDirs.sh ## to make a 'self-extracting install script' to be posted at ## the web site directory: ## $HOME/WebSites/WebSite1/freedomenv/NautilusScriptsFE ## ## We put the output file, [whatever].tar.gz, into the TARDIR directory ## --- the directory where the tar and pkg-making script(s) reside. ## ## HOW TO USE: Best for the 'package'-making-person to run this script ## in a terminal --- to see the commands being executed and ## error messages, if any. ## ## That person could run from his home directory, ## because this script should 'cd' to the proper directory ## to do the tar and gzip commands. ## ## ** NOTE **: Tailor the 2 DIR vars (APPDIR and TARDIR) and the 'tar' ## command below to suit the file structure of this application. ## ## ********** REMEMBER TO SET THE RELEASE-DATE in the TARFILE var!!!! ## --- in each build run. ## ## ********** REMEMBER TO UPDATE DIRECTORY NAMES IN THE tar COMMAND, ## if any directories are added or names are changed. ## ## Started: 2010may02 ## Changed: 2010aug21 Change dir names after copying the directories of Nautilus ## scripts into a subdirectory of the 'freedomenv' web directory. ## Changed: 2010sep02 Added the file '.set_TXTVIEWER.shi' to the tar file creation. ## Changed: 2011feb04 Added the 'zMORE' directory to the tar file creation, and ## '.OLD*' and '.TAR*' to the tar excludes. ## Changed: 2011may17 Added the file '.set_DIR_NautilusScripts.shi' to the ## tar file creation. Added '.TEST*' to the tar excludes. ## Changed: 2012mar01 Changed dirname 'PROCESSlists' to 'PROC-MEMlists'. ## Changed: 2012may25 Changed date in TARFILE var, for 2012may25 release. ## Changed: 2012jun25 Changed date in TARFILE var, for 2012jun25 release. ######################################################### ## Set the APPDIR and TARDIR vars --- and setup the 'tar' ## command below properly. ######################################################### APPDIR="$HOME/.gnome2/nautilus-scripts" TARDIR="$APPDIR/.TAR_NautilusScriptsFE" ## FOR DISPLAY of msgs in a terminal window when creating the tar file: set -x ############################################## ## 'cd' to the directory containing the ## application files --- in this case, ## the FE Nautilus Scripts Directory. ############################################## cd "$APPDIR" ####################################################### ## Make the tar file from the app files. ## !!! CHANGE THIS DATE !!! before running this script! ####################################################### TARFILE="$TARDIR/pkg_NautilusScriptsFE_2014dec16.tar" tar -cvf "$TARFILE" \ --exclude=".bkup*" \ --exclude=".OLD*" \ --exclude=".TAR*" \ --exclude=".PREP*" \ --exclude=".TEST*" \ AUDIOtools/ \ CHANGEfiles/ \ EXAMINEfiles/ \ FILESlists/ \ FINDlists/ \ IMAGEtools/ \ LinuxHELPS/ \ PROC-MEMlists/ \ SPACElists/ \ TERMtools/ \ VIDEOtools/ \ zMORE/ \ .set_VIEWERvars.shi \ zEdit_VIEWERvarsFile.sh \ .set_DIR_NautilusScripts.shi ############################################## ## 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. ############################# " ################################################## ## Put the TOC in a file --- for checking ## for a 'clean' install. That is, check that ## (only) the desired files are in the tar.gz file. ## For example, no '~' editor backup files. ################################################## OUTLIST="/tmp/temp_tarTOC.lis" tar ztvf "${TARFILE}.gz" > "$OUTLIST" gedit "$OUTLIST"