ref: d5977e3393e6486566ac307f40d8c3492ed8338f
dir: /package.rc/
name64='opossum-amd64' name32='opossum-386' version=`{date -i} ^ '-' ^ `{cat .git/fs/branch/heads/master/hash | read -c 6} tarball64=`{pwd} ^ '/packages/' ^ $name64 ^ '-' ^ $version ^ '.tgz' tarball32=`{pwd} ^ '/packages/' ^ $name32 ^ '-' ^ $version ^ '.tgz' a='-buildvcs=false' fn build { tarball=$1 name=$2 GOARCH=$3 rm -rf ./$name mkdir ./$name mkdir -p ./packages chmod +t ./$name echo Compiling $GOARCH... cd cmd/opossum go build $a -ldflags '-s -w' -o $name cd ../.. cd ../gojafs/cmd/gojafs go build $a -ldflags '-s -w' -o gojafs cd ../../../opossum mv cmd/opossum/$name ../gojafs/cmd/gojafs/gojafs ./$name/ cp README.md ./$name/ cp opossum.jpg ./$name/ tar czf $tarball $name chmod +t $tarball echo Created $tarball } echo Testing... go vet $a ./... go test $a -cover ./... build $tarball64 $name64 amd64 build $tarball32 $name32 386 echo Verifying $tarball64 ... mkdir -p /tmp/`{date -n} cd /tmp/`{date -n} tar xf $tarball64 cd $name64 ./$name64 -v ./$name64 -v -jsinsecure