2 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 # + This file is part of enGrid. +
6 # + Copyright 2008-2014 enGits GmbH +
8 # + enGrid is free software: you can redistribute it and/or modify +
9 # + it under the terms of the GNU General Public License as published by +
10 # + the Free Software Foundation, either version 3 of the License, or +
11 # + (at your option) any later version. +
13 # + enGrid is distributed in the hope that it will be useful, +
14 # + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 # + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 # + GNU General Public License for more details. +
18 # + You should have received a copy of the GNU General Public License +
19 # + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
21 # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26 # echo "================"
27 # echo "TMPDIR = $TMPDIR"
28 # echo "================"
30 # ldd ./engrid > $TMPDIR/ldd.out
31 # mkdir $TMPDIR/enGrid
32 # #cp engrid $TMPDIR/enGrid
33 # #cp start_engrid enGrid
34 # tar -czvf enGrid_bin.tar.gz $TMPDIR/enGrid/*
40 # Check if all parameters are present
45 echo "`basename $0` VERSION SRCDIR ARCHITECTURE"
46 echo "You must run this script from SRCDIR/.."
51 #SRCDIR=$(readlink -f $2)
58 tarname
="enGrid_linux"$ARCH"bit_"$VERSION".tar"
59 gzname
="enGrid_linux"$ARCH"bit_"$VERSION".tar.gz"
60 dirname="enGrid_linux"$ARCH"bit_"$VERSION
64 TARGET
=$
(readlink
-f $1)
67 echo "$TARGET already exists."
68 echo "rm -v $TARGET ?(y/n/q)"
71 y|Y|
yes) rm -v $TARGET;;
73 *) echo "proceeding without removing";;
78 saferemove_recursive
()
80 TARGET
=$
(readlink
-f $1)
83 echo "$TARGET already exists."
84 echo "rm -rfv $TARGET ?(y/n/q)"
87 y|Y|
yes) rm -rfv $TARGET;;
89 *) echo "proceeding without removing";;
94 # remove traces from last use
95 saferemove_recursive tmp
103 # echo "$TMP already exists."
104 # echo "rm -rfv $TMP ?(y/n/q)"
107 # y|Y|yes) rm -rfv $TMP;;
109 # *) echo "proceeding without removing";;
115 #get all dependencies
118 #mv -v enGrid_bin.tar.gz $TMP
129 #add scripts + dependencies
131 tar -f $tarname -r $SRCDIR/distribution
/setup
132 #tar -f $tarname -r $SRCDIR/start_engrid
133 tar -f $tarname -r $SRCDIR/enGrid_bin.
tar.gz
134 tar -f $tarname -r $SRCDIR/distribution
/README
136 #change back to SRCDIR + add source files
137 tar -f $tarname -r $SRCDIR/*.h
138 tar -f $tarname -r $SRCDIR/*.cpp
139 tar -f $tarname -r $SRCDIR/*.cxx
140 tar -f $tarname -r $SRCDIR/*.ui
141 tar -f $tarname -r $SRCDIR/licence.txt
142 tar -f $tarname -r $SRCDIR/resources
143 tar -f $tarname -r $SRCDIR/engrid.pro
144 tar -f $tarname -r $SRCDIR/engrid.qrc
145 tar -f $tarname -r $SRCDIR/math
/*.h
146 tar -f $tarname -r $SRCDIR/netgen_svn
/netgen-mesher
/netgen
147 tar -f $tarname -r $SRCDIR/netgen_svn
/ng.pro
150 #tar -czvf $gzname $TMP
151 #mv -v $gzname $ORIG_WD
155 #extract .tar in ./tmp
162 #rename the extracted dir
164 tar czf
$gzname $dirname
167 saferemove_recursive tmp