Skip to content

Instantly share code, notes, and snippets.

@NetzwergX
Created May 10, 2012 13:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save NetzwergX/2652879 to your computer and use it in GitHub Desktop.
Pushes contents of WCF repositories to live install
#!/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/
@ThiefMaster
Copy link

Why use test instead of the bash builtin [[?

@NetzwergX
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment