Skip to content

Instantly share code, notes, and snippets.

@joaompinto
Created August 18, 2013 21:25
Show Gist options
  • Save joaompinto/6264089 to your computer and use it in GitHub Desktop.
Save joaompinto/6264089 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
[[ $# != 2 ]] && echo "Usage: $0 projectDir snapshot.zip" && exit 1
projectDir=$1
snapZip=$2
tmpDir=$(mktemp -d)
unzip -d $tmpDir $snapZip
jarFiles=$(find $projectDir -name gdx*.jar)
for file in $jarFiles
do
filename=$(basename $file)
[[ -f $tmpDir/$filename ]] && (
echo Refreshing $file
cp $tmpDir/$filename $file
)
done
rm -r $tmpDir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment