command_skeleton.sh 758 B

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