I'm writing a script to copy some files around, and trying to use shopt -s dotglob
to enable cp to copy dotfiles like .jshint
and whatnot.
I can run shopt -s dotglob
directly at a bash prompt with no error. However, running the script throws the error:
script.sh: 81: script.sh: shopt: not found
I'm running this script in bash shell, with the shebang header #!/usr/bin/env bash
. Error line:
shopt -s dotglob
cp -r $TEMP/img/* $TARGET/img/
cp -r $TEMP/js/* $TARGET/js/
cp -r $TEMP/less/* $TARGET/less/
Not finding anything helpful on google, any idea what the problem is here?