Skip to content
Snippets Groups Projects
Commit 11a7ae9d authored by Albert Gräf's avatar Albert Gräf
Browse files

Make tar_em_up.sh handle nonzero exit codes from make and print some useful diagnostics at the end.

parent fa9c517a
No related branches found
No related tags found
1 merge request!172Build system fixes
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
# super-simplistic installer for l2ork things by Ivica Ico Bukvic <ico@vt.edu> # super-simplistic installer for l2ork things by Ivica Ico Bukvic <ico@vt.edu>
# for info on L2Ork visit http://l2ork.music.vt.edu # for info on L2Ork visit http://l2ork.music.vt.edu
cleanup() {
# maybe we'd want to do some actual cleanup here
test $2 -ne 0 && echo "$0: $1: command failed with exit code $2, exiting now." && echo "$0: $1: $BASH_COMMAND"
exit $2
}
trap 'cleanup $LINENO $?' ERR
if [ $# -eq 0 ] # should check for no arguments if [ $# -eq 0 ] # should check for no arguments
then then
echo echo
...@@ -142,7 +150,7 @@ if [ ! -d "../pd/nw/nw" ]; then ...@@ -142,7 +150,7 @@ if [ ! -d "../pd/nw/nw" ]; then
nwjs_url=${nwjs_url}/$nwjs_filename nwjs_url=${nwjs_url}/$nwjs_filename
echo "Fetching the nwjs binary from" echo "Fetching the nwjs binary from"
echo "$nwjs_url" echo "$nwjs_url"
wget -nv $nwjs_url || exit 1 wget -nv $nwjs_url
if [[ $os == "win" || $os == "osx" ]]; then if [[ $os == "win" || $os == "osx" ]]; then
unzip $nwjs_filename unzip $nwjs_filename
else else
...@@ -178,7 +186,7 @@ then ...@@ -178,7 +186,7 @@ then
echo "core Pd..." echo "core Pd..."
rm -f ../Pd-l2ork-`date +%Y%m%d`.tar.bz2 2> /dev/null rm -f ../Pd-l2ork-`date +%Y%m%d`.tar.bz2 2> /dev/null
cd pd/src/ cd pd/src/
make clean make clean || true # this may fail on 1st attempt
cd ../../ cd ../../
tar -jcf ./Pd-l2ork-`date +%Y%m%d`.tar.bz2 pd tar -jcf ./Pd-l2ork-`date +%Y%m%d`.tar.bz2 pd
fi fi
...@@ -207,17 +215,17 @@ then ...@@ -207,17 +215,17 @@ then
# read dummy # read dummy
# clean files that may remain stuck even after doing global make clean (if any) # clean files that may remain stuck even after doing global make clean (if any)
cd externals/miXed cd externals/miXed
make clean make clean || true # this may fail on 1st attempt
cd ../ cd ../
make gem_clean make gem_clean || true # this may fail on 1st attempt
cd ../Gem/src/ cd ../Gem/src/
make distclean make distclean || true # this may fail on 1st attempt
rm -rf ./.libs rm -rf ./.libs
rm -rf ./*/.libs rm -rf ./*/.libs
cd ../ cd ../
make distclean make distclean || true # this may fail on 1st attempt
rm gemglutwindow.pd_linux rm -f gemglutwindow.pd_linux
rm Gem.pd_linux rm -f Gem.pd_linux
aclocal aclocal
./autogen.sh ./autogen.sh
export INCREMENTAL="" export INCREMENTAL=""
...@@ -235,13 +243,14 @@ then ...@@ -235,13 +243,14 @@ then
fi fi
if [ $full -gt 1 -o $deb -eq 2 -o $inno -eq 2 -o $dmg -eq 2 ] if [ $full -gt 1 -o $deb -eq 2 -o $inno -eq 2 -o $dmg -eq 2 ]
then then
make distclean make distclean || true # this may fail on 1st attempt
cp ../../pd/src/g_all_guis.h ../../externals/build/include cp ../../pd/src/g_all_guis.h ../../externals/build/include
cp ../../pd/src/g_canvas.h ../../externals/build/include cp ../../pd/src/g_canvas.h ../../externals/build/include
cp ../../pd/src/m_imp.h ../../externals/build/include cp ../../pd/src/m_imp.h ../../externals/build/include
cp ../../pd/src/m_pd.h ../../externals/build/include cp ../../pd/src/m_pd.h ../../externals/build/include
cp ../../pd/src/s_stuff.h ../../externals/build/include # ag: s_stuff.h may not exist at this point yet (will be
cp ../../pd/src/t_tk.h ../../externals/build/include # generated later), is this really needed here?
test -f ../../pd/src/s_stuff.h && cp ../../pd/src/s_stuff.h ../../externals/build/include
cp ../../pd/src/g_all_guis.h ../../externals/build/include cp ../../pd/src/g_all_guis.h ../../externals/build/include
rm -rf build/ rm -rf build/
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment