@@ -45,17 +45,21 @@ Installs ${FLPRODUCT} Bible Software with Wine on Linux.
45
45
Options:
46
46
-h --help Prints this help message and exit.
47
47
-v --version Prints version information and exit.
48
+ -V --verbose Enable extra CLI verbosity.
48
49
-D --debug Makes Wine print out additional info.
49
50
-c --config Use the Logos on Linux config file when
50
51
setting environment variables. Defaults to:
51
52
\$ HOME/.config/Logos_on_Linux/Logos_on_Linux.conf
52
53
Optionally can accept a config file provided by
53
54
the user.
55
+ -b --custom-binary-path Set a custom path to search for wine binaries
56
+ during the install.
54
57
-r --regenerate-scripts Regenerates the Logos.sh and controlPanel.sh
55
58
scripts using the config file.
56
59
-F --skip-fonts Skips installing corefonts and tahoma.
57
60
-f --force-root Sets LOGOS_FORCE_ROOT to true, which permits
58
61
the root user to run the script.
62
+ -k --make-skel Make a skeleton install only.
59
63
EOF
60
64
}
61
65
@@ -65,17 +69,13 @@ die-if-root() {
65
69
fi
66
70
}
67
71
68
- verbose () {
69
- [[ $VERBOSE = true ]] && return 0 || return 1
70
- }
72
+ verbose () { [[ $VERBOSE = true ]] && return 0 || return 1; };
71
73
72
- debug () {
73
- [[ $DEBUG = true ]] && return 0 || return 1
74
- }
74
+ debug () { [[ $DEBUG = true ]] && return 0 || return 1; };
75
75
76
76
die () { echo >&2 " $* " ; exit 1; };
77
77
78
- t (){ type " $1 " &> /dev/null; }
78
+ t (){ type " $1 " &> /dev/null; } ;
79
79
80
80
# Sources:
81
81
# https://askubuntu.com/a/1021548/680649
@@ -449,20 +449,6 @@ make_skel() {
449
449
verbose && echo " skel64 done!"
450
450
}
451
451
452
- # TODO: Move this to a CLI optarg.
453
-
454
- # #======= Parsing =============
455
- # case "${1}" in
456
- # "skel64")
457
- # export WINE_EXE="wine64"
458
- # make_skel "${WINE_EXE}" "none.AppImage"
459
- # rm -rf "${WORKDIR}"
460
- # exit 0
461
- # ;;
462
- # *)
463
- # verbose && echo "No arguments parsed."
464
- # esac
465
-
466
452
# # BEGIN CHECK DEPENDENCIES FUNCTIONS
467
453
check_commands () {
468
454
for cmd in " $@ " ; do
@@ -618,7 +604,9 @@ wineBinaryVersionCheck() {
618
604
if [ -x " ${TESTBINARY} " ]; then
619
605
TESTWINEVERSION=$( " $TESTBINARY " --version | awk -F' ' ' {print $1}' | awk -F' -' ' {print $2}' | awk -F' .' ' {print $1"."$2}' ) ;
620
606
if (( $(echo "$TESTWINEVERSION >= $WINE_MINIMUM " | bc - l) )) ; then
621
- return 0;
607
+ if (( $(echo "$TESTWINEVERSION != 8 .0 " | bc - l) )) ; then
608
+ return 0;
609
+ fi
622
610
elif [[ ${TESTBINARY} =~ .* " Proton - Experimental" .* ]]; then
623
611
return 0;
624
612
# If it is a symlink, check its actual path. If it is Proton, let it pass.
@@ -645,7 +633,7 @@ checkPath() {
645
633
646
634
createWineBinaryList () {
647
635
# TODO: Make optarg to add custom path to this array.
648
- WINEBIN_PATH_ARRAY=( " /usr/local/bin" " $HOME /bin" " $HOME /PlayOnLinux/wine/linux-amd64/*/bin" " $HOME /.steam/steam/steamapps/common/Proton - Experimental/files/bin" )
636
+ WINEBIN_PATH_ARRAY=( " /usr/local/bin" " $HOME /bin" " $HOME /PlayOnLinux/wine/linux-amd64/*/bin" " $HOME /.steam/steam/steamapps/common/Proton - Experimental/files/bin" " ${CUSTOMBINPATH} " )
649
637
650
638
# Temporarily modify PATH for additional WINE64 binaries.
651
639
for p in " ${WINEBIN_PATH_ARRAY[@]} " ; do
@@ -797,6 +785,11 @@ checkExistingInstall() {
797
785
}
798
786
799
787
beginInstall () {
788
+ if [ " ${SKEL} " -eq " 1" ]; then
789
+ verbose && echo " Making a skeleton install of the project only. Exiting after completion."
790
+ make_skel " none.AppImage"
791
+ exit 0;
792
+ fi
800
793
if [ -n " ${WINEBIN_CODE} " ]; then
801
794
case " ${WINEBIN_CODE} " in
802
795
" System" |" Proton" |" PlayOnLinux" |" Custom" )
@@ -1217,8 +1210,6 @@ postInstall() {
1217
1210
1218
1211
main () {
1219
1212
echo " $LOGOS_SCRIPT_TITLE , $LOGOS_SCRIPT_VERSION by $LOGOS_SCRIPT_AUTHOR ."
1220
- die-if-root;
1221
- getDialog;
1222
1213
debug && logos_info " Debug mode enabled."
1223
1214
1224
1215
# BEGIN PREPARATION
@@ -1253,6 +1244,11 @@ main() {
1253
1244
fi
1254
1245
}
1255
1246
1247
+ # BEGIN SCRIPT
1248
+
1249
+ die-if-root;
1250
+ getDialog;
1251
+
1256
1252
# BEGIN OPTARGS
1257
1253
RESET_OPTARGS=true
1258
1254
for arg in " $@ "
@@ -1263,16 +1259,19 @@ do
1263
1259
fi
1264
1260
case " $arg " in # Relate long options to short options
1265
1261
--help) set -- " $@ " -h ;;
1266
- --version) set -- " $@ " -V ;;
1262
+ --version) set -- " $@ " -v ;;
1263
+ --verbose) set -- " $@ " -V ;;
1267
1264
--config) set -- " $@ " -c ;;
1268
1265
--skip-fonts) set -- " $@ " -F ;;
1269
1266
--regenerate-scripts) set -- " $@ " -r ;;
1270
1267
--force-root) set -- " $@ " -f ;;
1271
1268
--debug) set -- " $@ " -D ;;
1269
+ --make-skel) set -- " $@ " -k ;;
1270
+ --custom-binary-path) set -- " $@ " -b ;;
1272
1271
* ) set -- " $@ " " $arg " ;;
1273
1272
esac
1274
1273
done
1275
- OPTSTRING=' :hvcDfFr ' # Available options
1274
+ OPTSTRING=' :hvVcDfFrkb: ' # Available options
1276
1275
1277
1276
# First loop: set variable options which may affect other options
1278
1277
while getopts " $OPTSTRING " opt; do
@@ -1304,11 +1303,19 @@ while getopts "$OPTSTRING" opt; do
1304
1303
logos_info " No config file found."
1305
1304
fi
1306
1305
;;
1306
+ V) export VERBOSE=" true" ;;
1307
1307
F) export SKIP_FONTS=" 1" ;;
1308
1308
f) export LOGOS_FORCE_ROOT=" 1" ; ;;
1309
1309
r) export REGENERATE=" 1" ; ;;
1310
- D) export DEBUG=true;
1310
+ D) export DEBUG=" true" ;
1311
1311
WINEDEBUG=" " ; ;;
1312
+ k) export SKEL=" 1" ; ;;
1313
+ b) CUSTOMBINPATH=" $2 " ;
1314
+ if [ -d " $CUSTOMBINPATH " ]; then
1315
+ export CUSTOMBINPATH;
1316
+ else
1317
+ logos_info " $LOGOS_SCRIPT_TITLE : User supplied path: \" ${OPTARG} \" . Custom binary path does not exist." >&2 && usage >&2 && exit
1318
+ fi ; shift 2 ;;
1312
1319
\? ) logos_info " $LOGOS_SCRIPT_TITLE : -$OPTARG : undefined option." >&2 && usage >&2 && exit ;;
1313
1320
:) logos_info " $LOGOS_SCRIPT_TITLE : -$OPTARG : missing argument." >&2 && usage >&2 && exit ;;
1314
1321
esac
0 commit comments