Skip to content

Commit

Permalink
Improve QMAKE variable. Refactor VER. Enclose variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcerrejon committed Apr 8, 2024
1 parent 48ad07e commit 05dc77a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/linux/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@
set -e

TARGET_DIR=/tmp/sqls-installer
QMAKE=/opt/qt/5.10.0/gcc_64/bin/qmake
QMAKE=$(which qmake)
CORES=2
TMP_DIR=~/tmp/SQLiteStudio

if [ ! -f $QMAKE ]; then
if [ ! -f "$QMAKE" ]; then
echo "qmake at $QMAKE does not exist."
exit 1
fi

OLDDIR=`pwd`
OLDDIR=$(pwd)

VER=`grep 'static const int sqlitestudioVersion' ../../SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | egrep -o '[\ 0-9]{2}' | bc | paste -s -d'.'`
VER=$(grep 'static const int sqlitestudioVersion' ../../SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | grep -E -o '[\ 0-9]{2}' | bc | paste -s -d'.')

rm -rf ../../output
./compile.sh $QMAKE $CORES
./create_portable.sh $QMAKE
./compile.sh "$QMAKE" $CORES
./create_portable.sh "$QMAKE"
cd ../installer
rm -rf $TARGET_DIR
tclsh assemble.tcl $TARGET_DIR --repo

rm -rf $TMP_DIR
$TARGET_DIR/InstallSQLiteStudio-* TargetDir=$TMP_DIR
"$TARGET_DIR"/InstallSQLiteStudio-* TargetDir=$TMP_DIR

mv $TMP_DIR $TARGET_DIR/
cd $TARGET_DIR

tar cf sqlitestudio-$VER.tar SQLiteStudio
xz -z sqlitestudio-$VER.tar
tar cf "sqlitestudio-$VER.tar" SQLiteStudio
xz -z "sqlitestudio-$VER.tar"
rm -rf SQLiteStudio
echo "Deleted installed app. System is clean."

cd $OLDDIR
cd "$OLDDIR" || exit 1

0 comments on commit 05dc77a

Please sign in to comment.