Skip to content

Instantly share code, notes, and snippets.

@georgestephanis
Created March 17, 2014 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georgestephanis/9606995 to your computer and use it in GitHub Desktop.
Save georgestephanis/9606995 to your computer and use it in GitHub Desktop.
/tmp/jetpack $ sh test.sh
test.sh: command substitution: line 9: syntax error near unexpected token `('
test.sh: command substitution: line 9: `diff -B <( echo $SVN_FILES ) <( echo $GIT_FILES ) | grep "^<.*" '
#!/bin/bash
JETPACK_GIT_DIR="/Users/georgestephanis/code/jetpack"
# Delete files in the SVN repo that are no longer in the Git repo.
SVN_FILES=$( cd trunk && find . -type f )
GIT_FILES=$( cd $JETPACK_GIT_DIR && find . -type f )
RM_FILES=$(diff -B <( echo $SVN_FILES ) <( echo $GIT_FILES ) | grep "^<.*" )
echo $RM_FILES
#if [ -z "$RM_FILES" ]; then
# for THIS_FILE in $RM_FILES
# do
# cd trunk && rm $THIS_FILE
# done
#fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment