Skip to content

Instantly share code, notes, and snippets.

@raine
Created April 24, 2013 19:50
Show Gist options
  • Select an option

  • Save raine/5455025 to your computer and use it in GitHub Desktop.

Select an option

Save raine/5455025 to your computer and use it in GitHub Desktop.
mkdir -p dist/
find . -maxdepth 1 -type d \( -path ./.git -o -path ./assets -o -path ./dist \) -prune -o \
-name '*' ! -name '.*' ! -name 'README.md' ! -name 'Makefile' -print | \
xargs -I % sh -c '{ echo %; cp -R % dist/; }'
cd dist && find . -name 'manifest.json' -o -name 'options.html' | \
xargs sed -i. "s/%VERSION%/$$VERSION/g"
find dist -type f -name ".*" | xargs rm
cd dist && zip -r ../memrise-button .
open .
clean:
rm -f memrise-button.zip
rm -rf dist/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment