mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-19 04:22:36 +01:00
42 lines
676 B
Bash
Executable File
42 lines
676 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Creates the rst files when creating a new module.
|
|
# Thu Apr 3 11:54:16 CEST 2014
|
|
|
|
if [[ -z ${QPACKAGE_ROOT} ]]
|
|
then
|
|
print "The QPACKAGE_ROOT environment variable is not set."
|
|
print "Please reload the quantum_package.rc file."
|
|
exit -1
|
|
fi
|
|
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
|
|
|
check_current_dir_is_module
|
|
|
|
README="True"
|
|
if [[ -f README.rst ]]
|
|
then
|
|
asksure "Overwrite existing README.rst file?" || README="False"
|
|
fi
|
|
|
|
UNDERLINE="======="
|
|
declare -i i=0
|
|
while [[ i -lt ${#MODULE} ]]
|
|
do
|
|
UNDERLINE+="="
|
|
i+=1
|
|
done
|
|
|
|
if [[ ${README} == "True" ]]
|
|
then
|
|
cat << EOF > ./README.rst
|
|
$UNDERLINE
|
|
$MODULE Module
|
|
$UNDERLINE
|
|
|
|
EOF
|
|
fi
|
|
|
|
touch ./ASSUMPTIONS.rst
|
|
|