pip install sphinx
sphinx-quickstart -q -p DSPackageDocs -a Me -v 1 --ext-autodoc
perl -i -e $'s/#sys.path.insert(0, os.path.abspath(\'.\'))/sys.path.insert(0, os.path.abspath(\'.\/DSPackage\'))/g' conf.py
The 3rd line looks into a file and replaces some text. Specifically, I replace
sys.path.insert(0, os.path.abspath('.'))
with
sys.path.insert(0, os.path.abspath('./DSPackage'))
This line works perfectly fine in the terminal in the shell script I get the error:
Syntax error: ")" unexpected
I'm getting the error if I execute the command in
dash
.dash
doesn't seem to support the$'...'
quotes.It works OK in
bash
, and emits different errors inzsh
andksh
:Make sure to specify the correct shell on the first line of the script
and to call the script correctly:
or