echo `hostname` | grep desktop && cp ~/.vimrc .; cp ~/.zshrc .; cp ~/.bashrc . && git add .; git commit -m "update"; git push || cp -r ~/.irssi/ . && git add .; git commit -m "update"; git push
echo `hostname` | grep desktop && cp ~/.vimrc .; cp ~/.zshrc .; cp ~/.bashrc . && git add .; git commit -m "update"; git push
- if the hostname "desktop" is echoed, do:
cp 1; 2; 3 && git 1; 2; 3
|| cp -r ~/.irssi/ . && git add .; git commit -m "update"; git push
- if a hostname other than "desktop" is entered, then do:
cp -r 1; 2; 3; && git 1; 2; 3
What actually happens is both commands are executed and both files are copied.