command_skeleton.sh 825 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # LinuxGSM command_skeleton.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://linuxgsm.com/contrib
  5. # Website: https://linuxgsm.com
  6. # Description: Creates a copy of a game server directories.
  7. commandname="SKELETON"
  8. commandaction="Skeleton"
  9. moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  10. fn_firstcommand_set
  11. fn_print_dots "Creating skeleton directory"
  12. check.sh
  13. # Find all directories and create them in the skel directory
  14. find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2> /dev/null
  15. exitcode=$?
  16. if [ "${exitcode}" -ne 0 ]; then
  17. fn_print_fail_nl "Creating skeleton directory"
  18. fn_script_log_fail "Creating skeleton directory"
  19. else
  20. fn_print_ok_nl "Creating skeleton directory: ./skel"
  21. fn_script_log_pass "Creating skeleton directory: ./skel"
  22. fi
  23. core_exit.sh