mirror of https://github.com/Poikilos/b3view
For install, detect standard Qt Creator build directory.
parent
32b2b5244d
commit
e75f4c1c36
|
@ -1,4 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
customDie() {
|
||||||
|
echo
|
||||||
|
echo "ERROR:"
|
||||||
|
echo "$1"
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
if [ -z "$PREFIX" ]; then PREFIX=/usr/local; fi
|
if [ -z "$PREFIX" ]; then PREFIX=/usr/local; fi
|
||||||
|
@ -6,7 +16,8 @@ dest_bin_dir="$PREFIX/bin"
|
||||||
dest_share_dir="$PREFIX/share"
|
dest_share_dir="$PREFIX/share"
|
||||||
project_unix_name=b3view
|
project_unix_name=b3view
|
||||||
dest_name=$project_unix_name
|
dest_name=$project_unix_name
|
||||||
src_path="$project_unix_name"
|
src_name="$project_unix_name"
|
||||||
|
src_path="$src_name"
|
||||||
try_dest_bin="$dest_bin_dir/$dest_name"
|
try_dest_bin="$dest_bin_dir/$dest_name"
|
||||||
icon_name="b3view.png"
|
icon_name="b3view.png"
|
||||||
icon_src_path="icons/$icon_name"
|
icon_src_path="icons/$icon_name"
|
||||||
|
@ -22,17 +33,25 @@ SYSTEM_MIMETYPES_DB_PATH=/usr/share/mime
|
||||||
#SYSTEM_MIMETYPES_PATH=$SYSTEM_MIMETYPES_DB_PATH/packages
|
#SYSTEM_MIMETYPES_PATH=$SYSTEM_MIMETYPES_DB_PATH/packages
|
||||||
MIMETYPES_DB_PATH=$SYSTEM_MIMETYPES_DB_PATH
|
MIMETYPES_DB_PATH=$SYSTEM_MIMETYPES_DB_PATH
|
||||||
|
|
||||||
|
try_build_path="../../build-$project_unix_name-Desktop-Release/build/"
|
||||||
|
try_src_path="$try_build_path/$src_name"
|
||||||
if [ ! -f $src_path ]; then
|
if [ ! -f $src_path ]; then
|
||||||
echo "ERROR: Nothing done since missing $src_path"
|
echo "Checking for $src_path...NOT FOUND"
|
||||||
sleep 4
|
if [ -f "$try_src_path" ]; then
|
||||||
exit 1
|
echo "Checking for $src_name in $try_build_path...FOUND"
|
||||||
|
src_path="$try_src_path"
|
||||||
|
else
|
||||||
|
echo "Checking for $src_name in $try_build_path...NOT FOUND"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ ! -f $src_path ]; then
|
||||||
|
customDie "(Nothing done) missing $src_name (You must build first, such as using Qt Creator)."
|
||||||
|
else
|
||||||
|
echo "Checking for $src_path...FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$try_dest_bin" ]; then
|
if [ -d "$try_dest_bin" ]; then
|
||||||
echo "ERROR: nothing done since '$try_dest_bin' is a directory (should be deleted or a binary file of old version)"
|
customDie "(Nothing done) '$try_dest_bin' is a directory (should be deleted or a binary file of old version)"
|
||||||
sleep 4
|
|
||||||
exit 2
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PROFILE_ENABLE=false
|
PROFILE_ENABLE=false
|
||||||
|
|
Loading…
Reference in New Issue