34 lines
1.5 KiB
Bash
34 lines
1.5 KiB
Bash
#!/bin/bash
|
|
echo "Deployment script for repository \"web-deployment\"
|
|
`date`
|
|
=============================================================================="
|
|
|
|
#activate ** globs
|
|
if [ -n "`shopt globstar | grep off`" ]; then shopt -s globstar; fi
|
|
#remove READMEs
|
|
rm ./threadr/**/README.md
|
|
|
|
#run the code variable replacement
|
|
echo -n "`find -name "*.php" -or -name "*.html" -or -name "*.css" -or -name "*.svg" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass0.json/'`" | bash -
|
|
echo -n "`find -name "*.php" -or -name "*.html" -or -name "*.css" -or -name "*.svg" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass1.json/'`" | bash -
|
|
echo -n "`find -name "*.php" -or -name "*.html" -or -name "*.css" -or -name "*.svg" | sed 's/^/python variable_grabbler.py /;s/$/ variable_grabbler.pass2.json/'`" | bash -
|
|
|
|
#the run-once section
|
|
echo "Checking run-once script..."
|
|
echo "Setting permissions."
|
|
chmod +x run-once-script.sh
|
|
|
|
# The status page is not just symlinked like the other files just to have a backup in case something goes wrong.
|
|
# Not like that ever happened before....
|
|
echo "Replacing status page..."
|
|
cp -v ./strassenkind.php /var/www/strassenkind.ip/index.php
|
|
cp -v ./internal.css /var/www/strassenkind.ip/style.css
|
|
cp -v ./commands_git.conf /var/www/strassenkind.ip/
|
|
cp -v ./commands_ondemand.conf /var/www/strassenkind.ip/
|
|
cp -v ./commands_status.conf /var/www/strassenkind.ip/
|
|
echo "Done."
|
|
|
|
|
|
echo "==============================================================================
|
|
Done."
|