public
Last active

Pushes contents of WCF repositories to live install

  • Download Gist
wcf-sync.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash
 
for dir in ~/git/com.woltlab.wcf.*/
do
test -e ${dir}files && cp -r -s --remove-destination ${dir}files/* ./wcf/
test -e ${dir}templates && cp -r -s --remove-destination ${dir}templates/* ./wcf/templates/
test -e ${dir}acptemplates && cp -r -s --remove-destination ${dir}acptemplates/* ./wcf/acp/templates/
done
 
wcffiles="~/git/WCF/wcfsetup/install/files/"
wcftemplates="~/git/WCF/com.woltlab.wcf/templates/"
test -e $wcffiles && cp -r -s --remove-destination ${wcffiles}* ./wcf/
test -e ${wcftemplates} && cp -r -s --remove-destination ${wcftemplates}* ./wcf/templates/
 
dir="~/git/Dummy-App/"
test -e ${dir}files && cp -r -s --remove-destination ${dir}files/* ./dummy/
test -e ${dir}templates && cp -r -s --remove-destination ${dir}templates/* ./dummy/templates/
test -e ${dir}acptemplates && cp -r -s --remove-destination ${dir}acptemplates/* ./dummy/acp/templates/

Why use test instead of the bash builtin [[?

I suppose I could have done that, but at the time of writing this seemed the more natural, expressive way. It doesn't make any difference in this case anyways.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.