SHARE
TWEET

mk_tar.sh

s243a Apr 15th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #THe Main code that we want to archive
  2. code_to_include=( "code" "examples" ) #Put array names in here
  3. directories_to_include=( "post_patch" "rootfs" "tazpup-core-files" )
  4. output_name="min-taz(all).tar.gz"
  5.  
  6. code=( "mk-min-taz-functions.sh" "trap_stack.sh" "trap_stack_test.sh" \
  7. "bind_functions.sh" "install-min-pkgs.sh" "adjacent_mount_rootfs.sh" \
  8. "mount_rootfs+bash" "mount_rootfs" )
  9. #We might want to archive this code for example/reference purposes
  10. examples=( "ref/make-tazpup_functions.sh" "ref/make-tazpup.sh" "ref/trim_puppy.sh" )
  11. echo_items(){
  12.   #arry_names_name=${1:-ALL_ArrNames}
  13.   #for arr_name in $(eval 'echo "${'$arry_names_name'[@]}"'); do
  14.   for item in "${code_to_include}" "${directories_to_include}"; do
  15.       if [ -d "$item" ]; then
  16.         find . -wholename "./$item"'/*'
  17.       else
  18.         echo "./$item"
  19.       fi
  20.   done
  21. }
  22. echo_items | tar -czvf "$output_name" --files-from -
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top