Skip to content

Commit

Permalink
update release script
Browse files Browse the repository at this point in the history
rename output directory with:

   mona_${version}_${platform}-${arch}
  • Loading branch information
marcofavorito committed Apr 24, 2021
1 parent 52e5c8d commit f00d139
Showing 1 changed file with 58 additions and 41 deletions.
99 changes: 58 additions & 41 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,47 +1,64 @@
#!/usr/bin/env bash

./configure && make && sudo make install-strip

rm -rf release
mkdir release
cp README release/
cp COPYING release/

mkdir release/bin
cp Front/mona release/bin

mkdir release/lib
cp -P GTA/.libs/libmonagta.a release/lib
cp -P GTA/.libs/libmonagta.so release/lib
cp -P GTA/.libs/libmonagta.so.1 release/lib
cp -P GTA/.libs/libmonagta.so.1.0.4 release/lib
cp -P DFA/.libs/libmonadfa.a release/lib
cp -P DFA/.libs/libmonadfa.so release/lib
cp -P DFA/.libs/libmonadfa.so.1 release/lib
cp -P DFA/.libs/libmonadfa.so.1.0.4 release/lib
cp -P BDD/.libs/libmonabdd.a release/lib
cp -P BDD/.libs/libmonabdd.so release/lib
cp -P BDD/.libs/libmonabdd.so.1 release/lib
cp -P BDD/.libs/libmonabdd.so.1.0.4 release/lib
cp -P Mem/.libs/libmonamem.a release/lib
cp -P Mem/.libs/libmonamem.so release/lib
cp -P Mem/.libs/libmonamem.so.1 release/lib
cp -P Mem/.libs/libmonamem.so.1.0.4 release/lib
for i in release/lib/*;

PLATFORM="linux"
ARCH="amd64"
VERSION="1.4-19.dev0"
RELEASE_NAME="mona_${VERSION}_${PLATFORM}-${ARCH}"
prefix="/usr/local"
includedir="${prefix}/include/"

OUTPUT_DIR="${RELEASE_NAME}"
OUTPUT_TAR="${RELEASE_NAME}.tar.gz"

./configure && make -j4

rm -rf "${OUTPUT_DIR}"
mkdir "${OUTPUT_DIR}"
cp README "${OUTPUT_DIR}"
cp COPYING "${OUTPUT_DIR}"

mkdir ${OUTPUT_DIR}/bin
cp Front/.libs/mona ${OUTPUT_DIR}/bin

mkdir ${OUTPUT_DIR}/lib
cp -P GTA/.libs/libmonagta.a ${OUTPUT_DIR}/lib
cp -P GTA/.libs/libmonagta.so ${OUTPUT_DIR}/lib
cp -P GTA/.libs/libmonagta.so.1 ${OUTPUT_DIR}/lib
cp -P GTA/.libs/libmonagta.so.1.0.4 ${OUTPUT_DIR}/lib
cp -P DFA/.libs/libmonadfa.a ${OUTPUT_DIR}/lib
cp -P DFA/.libs/libmonadfa.so ${OUTPUT_DIR}/lib
cp -P DFA/.libs/libmonadfa.so.1 ${OUTPUT_DIR}/lib
cp -P DFA/.libs/libmonadfa.so.1.0.4 ${OUTPUT_DIR}/lib
cp -P BDD/.libs/libmonabdd.a ${OUTPUT_DIR}/lib
cp -P BDD/.libs/libmonabdd.so ${OUTPUT_DIR}/lib
cp -P BDD/.libs/libmonabdd.so.1 ${OUTPUT_DIR}/lib
cp -P BDD/.libs/libmonabdd.so.1.0.4 ${OUTPUT_DIR}/lib
cp -P Mem/.libs/libmonamem.a ${OUTPUT_DIR}/lib
cp -P Mem/.libs/libmonamem.so ${OUTPUT_DIR}/lib
cp -P Mem/.libs/libmonamem.so.1 ${OUTPUT_DIR}/lib
cp -P Mem/.libs/libmonamem.so.1.0.4 ${OUTPUT_DIR}/lib
for i in ${OUTPUT_DIR}/lib/*;
do
strip $i;
done

mkdir release/include
mkdir release/include/mona
cp Mem/mem.h release/include/mona
cp Mem/gnuc.h release/include/mona
cp Mem/dlmalloc.h release/include/mona
cp BDD/bdd_external.h release/include/mona
cp BDD/bdd_dump.h release/include/mona
cp BDD/bdd_internal.h release/include/mona
cp BDD/bdd.h release/include/mona
cp BDD/hash.h release/include/mona
cp DFA/dfa.h release/include/mona
cp GTA/gta.h release/include/mona
cp config.h release/include/mona
mkdir ${OUTPUT_DIR}/include
mkdir ${OUTPUT_DIR}/include/mona
cp Mem/mem.h ${OUTPUT_DIR}/include/mona
cp Mem/gnuc.h ${OUTPUT_DIR}/include/mona
cp Mem/dlmalloc.h ${OUTPUT_DIR}/include/mona
cp BDD/bdd_external.h ${OUTPUT_DIR}/include/mona
cp BDD/bdd_dump.h ${OUTPUT_DIR}/include/mona
cp BDD/bdd_internal.h ${OUTPUT_DIR}/include/mona
cp BDD/bdd.h ${OUTPUT_DIR}/include/mona
cp BDD/hash.h ${OUTPUT_DIR}/include/mona
cp DFA/dfa.h ${OUTPUT_DIR}/include/mona
cp GTA/gta.h ${OUTPUT_DIR}/include/mona
cp config.h ${OUTPUT_DIR}/include/mona

tar -c "${OUTPUT_DIR}" -f "${OUTPUT_TAR}"
rm -r "${OUTPUT_DIR}"

echo "Output in ${OUTPUT_TAR}"

0 comments on commit f00d139

Please sign in to comment.