2014-03-15 18:40:35 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
set -e
|
|
|
|
|
2014-03-15 18:40:35 +01:00
|
|
|
# This uses gox from https://github.com/mitchellh/gox
|
|
|
|
# Make sure you've run gox -build-toolchain
|
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
if [ "$1" == "" ]; then
|
|
|
|
echo "Syntax: $0 Version"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
VERSION="$1"
|
2014-03-15 18:40:35 +01:00
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
rm -rf build
|
2014-03-15 18:40:35 +01:00
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
gox -output "build/{{.Dir}}-${VERSION}-{{.OS}}-{{.Arch}}/{{.Dir}}"
|
2014-03-15 18:40:35 +01:00
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
mv build/rclone-${VERSION}-darwin-amd64 build/rclone-${VERSION}-osx-amd64
|
|
|
|
mv build/rclone-${VERSION}-darwin-386 build/rclone-${VERSION}-osx-386
|
2014-03-15 18:40:35 +01:00
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
cd build
|
2014-03-15 18:40:35 +01:00
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
for d in `ls`; do
|
|
|
|
cp -a ../README.txt $d/
|
|
|
|
cp -a ../README.html $d/
|
|
|
|
cp -a ../rclone.1 $d/
|
|
|
|
zip -r9 $d.zip $d
|
|
|
|
rm -rf $d
|
|
|
|
done
|
2014-03-15 18:40:35 +01:00
|
|
|
|
2014-04-24 19:11:08 +02:00
|
|
|
cd ..
|