#!/bin/sh
rm -rf Dist
if [ $# -ge 1 ]; then
- for arch in $*; do
- echo $arch
- BUILD_DIST=y ARCH=$arch make clean install
- done
+ ARCH=$1
else
- BUILD_DIST=y make clean install
+ ARCH=i386
fi
-tar -zcf Acess2_latest_bin.tar.gz Dist/*
+mkdir -p Releases/
+BUILD_DIST=y ARCH=$ARCH make clean all-install
+tar --transform="s|Dist/($ARCH/)*|Acess/|x" -zcf Releases/Acess2_latest_${ARCH}_bin.tar.gz Dist/$ARCH Dist/Acess2.$ARCH.gz
mdeltree b:/Acess2
-mcopy -s Dist/ b:/Acess2
-gzip -c AcessRelease.img > Acess2_latest.img.gz
+mcopy -s Dist/$ARCH/ b:/Acess2
+mcopy Dist/Acess2* b:/Acess2/Acess2.gz
+gzip -c AcessRelease.img > Releases/Acess2_latest_${ARCH}.img.gz