Skip to content

Instantly share code, notes, and snippets.

@paulrouget
Created January 13, 2016 13:12
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 paulrouget/99594449fe3ac7f0d6ab to your computer and use it in GitHub Desktop.
Save paulrouget/99594449fe3ac7f0d6ab to your computer and use it in GitHub Desktop.
a simple script to package servo
#!/bin/sh
set -e -x
if [[ "$OSTYPE" == "linux-gnu" ]]; then
os=linux
elif [[ "$OSTYPE" == "darwin"* ]]; then
os=mac
else
os=unknown
fi
build=release
tmp_dir=`mktemp -d`
branch=`git rev-parse --abbrev-ref HEAD`
zip_name=servo-$build-$branch-$os-`date +"%Y-%m-%d"`.zip
mkdir -p $tmp_dir/servo
cp -r target/$build/deps target/$build/servo resources $tmp_dir/servo
cd $tmp_dir
zip -q -r $zip_name servo
cd -
cp $tmp_dir/$zip_name .
rm -rf $tmp_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment