This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/23011370/how-to-recognize-whether-bash-or-dash-is-being-used-within-a-script | |
getTrueShellExeName() { | |
local trueExe nextTarget 2>/dev/null # ignore error in shells without `local` | |
# Determine the shell executable filename. | |
trueExe=$(ps -o comm= $$) || return 1 | |
# Strip a leading "-", as added e.g. by OSX for login shells. | |
[ "${trueExe#-}" = "$trueExe" ] || trueExe=${trueExe#-} | |
# Determine full executable path. | |
[ "${trueExe#/}" != "$trueExe" ] || trueExe=$([ -n "$ZSH_VERSION" ] && which -p "$trueExe" || which "$trueExe") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
deployment: | |
tasks: | |
- DEPLOYPATH="/home/$USER/public_html" | |
- TEMPDIR="/home/$USER/tmp/public_html" | |
- REPOPATH="/home/${USER}/repositories" | |
- rm -r $TEMPDIR; mkdir $TEMPDIR | |
- cp -Tar ${DEPLOYPATH}/.well-known ${TEMPDIR}/.well-known | |
- cp -Tar ${DEPLOYPATH}/cgi-bin ${TEMPDIR}/cgi-bin | |
- cp -Tar ${DEPLOYPATH}/index.phtml ${TEMPDIR}/index.phtml |
NewerOlder