Skip to content

Commit 46f2c2e

Browse files
committed
updates to install scripts
1 parent 20f6035 commit 46f2c2e

2 files changed

Lines changed: 32 additions & 13 deletions

File tree

build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
108
1+
109

script/jinstall.sh

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Usage: $(basename "$0") [OPTIONS] [Dir] [Jqt] [Addons]
2323
2424
Options:
2525
-h, --help Show this help and exit
26+
-d, --default install with default parameters (home/full/all)
2627
-f, --force Force operation (no prompts)
2728
2829
Give other parameters in order, use "" or empty for the default
@@ -31,26 +32,37 @@ Give other parameters in order, use "" or empty for the default
3132
The installation is to a $V subdirectory of this.
3233
In Linux, a directory of /usr makes a standard system install
3334
[Jqt] - Jqt installed, one of none|slim|full (default full)
34-
[Addons] - Addons installed, one of none|all (default none)
35+
[Addons] - Addons installed, one of none|all (default all)
3536
3637
Examples:
37-
$(basename "$0") # install full Jqt system under home with no addons
38-
$(basename "$0") "" slim # install slim Jqt system under home with no addons
39-
$(basename "$0") -f mydir none # install base system only in mydir, no prompts
40-
$(basename "$0") mydir none all # install base system in mydir plus all addons
41-
$(basename "$0") /usr none all # system base system install on Linux
38+
$(basename "$0") --default # install full Jqt system under home with all addons
39+
$(basename "$0") "" slim none # install slim Jqt system under home with no addons
40+
$(basename "$0") -f mydir none none # install base system only in mydir, no prompts
41+
$(basename "$0") mydir none # install base system in mydir with all addons
42+
$(basename "$0") /usr none none # system install on Linux, with base system only
4243
EOF
43-
exit 0
4444
}
4545

46+
# ----------------------------------------------------------------------
47+
if [ $# -eq 0 ]; then
48+
usage;
49+
printf "\nPress enter to continue "
50+
read wait
51+
printf "\n"
52+
exit 0
53+
fi
54+
55+
# ----------------------------------------------------------------------
4656
FORCE=0;
57+
DEFAULT=0;
4758

4859
# ----------------------------------------------------------------------
4960
# Parse options
5061
while [ $# -gt 0 ]; do
5162
case "$1" in
52-
-h|--help) usage ;;
63+
-h|--help) usage; exit 0 ;;
5364
-f|--force) FORCE=1; shift ;;
65+
-d|--default) DEFAULT=1; break ;;
5466
--) shift; break ;;
5567
-*) printf "Unknown option: $1" >&2; usage ;;
5668
*) break ;; # first non-option argument → stop parsing
@@ -59,9 +71,16 @@ done
5971

6072
# ----------------------------------------------------------------------
6173
# directory, Jqt, Addons parameters
62-
D=${1:-$HOME}
63-
P=${2:-"full"}
64-
A=${3:-"none"}
74+
75+
if [ $DEFAULT = "1" ]; then
76+
D=home
77+
P=full
78+
A=all
79+
else
80+
D=${1:-"home"}
81+
P=${2:-"full"}
82+
A=${3:-"all"}
83+
fi
6584

6685
# check likely incorrect directory
6786
case "$D" in
@@ -70,7 +89,7 @@ case "$D" in
7089
exit 1 ;;
7190
esac
7291

73-
if [ "$D" = "home" ]; then D=$HOME; fi
92+
if [ "$D" = "home" ]; then D="$HOME"; fi
7493

7594
# check Jqt selection
7695
case "$P" in

0 commit comments

Comments
 (0)