4
0

command_skeleton.sh 647 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # LinuxGSM command_skeleton.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Creates an copy of a game servers directorys.
  6. fn_print_dots "Creating skeleton directory"
  7. check.sh
  8. # Find all directorys and create them in the skel directory
  9. find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2>/dev/null
  10. exitcode=$?
  11. if [ "${exitcode}" != 0 ]; then
  12. fn_print_fail_nl "Creating skeleton directory"
  13. fn_script_log_fatal "Creating skeleton directory"
  14. else
  15. fn_print_ok_nl "Creating skeleton directory: ./skel"
  16. fn_script_log_pass "Creating skeleton directory: ./skel"
  17. fi
  18. core_exit.sh