1
1
diff --git a/setup.sh b/setup.sh
2
- index 6aa9b574..9fbefe65 100755
2
+ index 8c6209fb..b7651485 100755
3
3
--- a/setup.sh
4
4
+++ b/setup.sh
5
- @@ -48 ,8 +48 ,8 @@ readonly SYS_BIN_PATH="/usr/local/bin" # UNIX path to 'bin' dir
5
+ @@ -39 ,8 +39 ,8 @@ readonly SYS_BIN_PATH="/usr/local/bin" # UNIX path to 'bin' dir
6
6
readonly USER_BIN_PATH="${HOME}/.local/bin" # UNIX path to 'bin' directory for a '--user' WinApps installation.
7
7
readonly USER_BIN_PATH_WIN='\\tsclient\home\.local\bin' # WINDOWS path to 'bin' directory for a '--user' WinApps installation.
8
8
# 'SOURCE'
@@ -13,7 +13,7 @@ index 6aa9b574..9fbefe65 100755
13
13
# 'APP'
14
14
readonly SYS_APP_PATH="/usr/share/applications" # UNIX path to 'applications' directory for a '--system' WinApps installation.
15
15
readonly USER_APP_PATH="${HOME}/.local/share/applications" # UNIX path to 'applications' directory for a '--user' WinApps installation.
16
- @@ -79 ,7 +79 ,7 @@ readonly TEST_PATH_WIN="${USER_APPDATA_PATH_WIN}\\FreeRDP_Connection_Test" # WIN
16
+ @@ -70 ,7 +70 ,7 @@ readonly TEST_PATH_WIN="${USER_APPDATA_PATH_WIN}\\FreeRDP_Connection_Test" # WIN
17
17
# 'WinApps Configuration File'
18
18
readonly CONFIG_PATH="${HOME}/.config/winapps/winapps.conf" # UNIX path to the WinApps configuration file.
19
19
# 'Inquirer Bash Script'
@@ -22,7 +22,7 @@ index 6aa9b574..9fbefe65 100755
22
22
23
23
# REMOTE DESKTOP CONFIGURATION
24
24
readonly VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY).
25
- @@ -139 ,13 +139 ,13 @@ function waTerminateScript() {
25
+ @@ -130 ,13 +130 ,13 @@ function waTerminateScript() {
26
26
# Role: Displays usage information for the script.
27
27
function waUsage() {
28
28
echo -e "Usage:
@@ -43,16 +43,44 @@ index 6aa9b574..9fbefe65 100755
43
43
}
44
44
45
45
# Name: 'waGetSourceCode'
46
- @@ -168,7 +168,7 @@ function waGetSourceCode() {
47
- $SUDO git clone --recurse-submodules --remote-submodules https://github.com/winapps-org/winapps.git "$SOURCE_PATH"
48
- else
49
- echo -e "${INFO_TEXT}WinApps installation already present at ${CLEAR_TEXT}${COMMAND_TEXT}${SOURCE_PATH}${CLEAR_TEXT}${INFO_TEXT}. Updating...${CLEAR_TEXT}"
50
- - $SUDO git -C "$SOURCE_PATH" pull --no-rebase
51
- +
46
+ @@ -155,13 +155,6 @@ function waGetSourceCode() {
47
+ echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You might want to remove your old installation on '${SCRIPT_DIR_PATH}'."
52
48
fi
53
49
50
+ - if [[ ! -d "$SOURCE_PATH" ]]; then
51
+ - $SUDO git clone --recurse-submodules --remote-submodules https://github.com/winapps-org/winapps.git "$SOURCE_PATH"
52
+ - else
53
+ - echo -e "${INFO_TEXT}WinApps installation already present at ${CLEAR_TEXT}${COMMAND_TEXT}${SOURCE_PATH}${CLEAR_TEXT}${INFO_TEXT}. Updating...${CLEAR_TEXT}"
54
+ - $SUDO git -C "$SOURCE_PATH" pull --no-rebase
55
+ - fi
56
+ -
54
57
# Silently change the working directory.
55
- @@ -395,7 +395,7 @@ function waCheckExistingInstall() {
58
+ if ! cd "$SOURCE_PATH" &>/dev/null; then
59
+ # Display the error type.
60
+ @@ -186,21 +179,8 @@ function waGetSourceCode() {
61
+ # Name: 'waGetInquirer'
62
+ # Role: Loads the inquirer script, even if the source isn't cloned yet
63
+ function waGetInquirer() {
64
+ - local INQUIRER=$INQUIRER_PATH
65
+ -
66
+ - if [ -d "$SYS_SOURCE_PATH" ]; then
67
+ - INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH
68
+ - elif [ -d "$USER_SOURCE_PATH" ] ; then
69
+ - INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH
70
+ - else
71
+ - INQUIRER="/tmp/waInquirer.sh"
72
+ - rm -f "$INQUIRER"
73
+ -
74
+ - curl -o "$INQUIRER" "https://raw.githubusercontent.com/winapps-org/winapps/main/install/inquirer.sh"
75
+ - fi
76
+ -
77
+ # shellcheck source=/dev/null # Exclude this file from being checked by ShellCheck.
78
+ - source "$INQUIRER"
79
+ + source "$INQUIRER_PATH"
80
+ }
81
+
82
+ # Name: 'waCheckInput'
83
+ @@ -390,7 +370,7 @@ function waCheckExistingInstall() {
56
84
57
85
# Display the suggested action(s).
58
86
echo "--------------------------------------------------------------------------------"
@@ -61,7 +89,7 @@ index 6aa9b574..9fbefe65 100755
61
89
echo "--------------------------------------------------------------------------------"
62
90
63
91
# Terminate the script.
64
- @@ -415 ,7 +415 ,7 @@ function waCheckExistingInstall() {
92
+ @@ -410 ,7 +390 ,7 @@ function waCheckExistingInstall() {
65
93
66
94
# Display the suggested action(s).
67
95
echo "--------------------------------------------------------------------------------"
@@ -70,7 +98,7 @@ index 6aa9b574..9fbefe65 100755
70
98
echo "--------------------------------------------------------------------------------"
71
99
72
100
# Terminate the script.
73
- @@ -810 ,7 +810 ,7 @@ function waCheckGroupMembership() {
101
+ @@ -805 ,7 +785 ,7 @@ function waCheckGroupMembership() {
74
102
# Identify groups the current user belongs to.
75
103
USER_GROUPS=$(groups "$(whoami)")
76
104
@@ -79,7 +107,7 @@ index 6aa9b574..9fbefe65 100755
79
107
# Complete the previous line.
80
108
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
81
109
82
- @@ -1244 ,11 +1244 ,11 @@ function waConfigureWindows() {
110
+ @@ -1239 ,11 +1219 ,11 @@ function waConfigureWindows() {
83
111
# Populate variables.
84
112
WIN_BASH="\
85
113
#!/usr/bin/env bash
@@ -93,7 +121,7 @@ index 6aa9b574..9fbefe65 100755
93
121
Terminal=false
94
122
Type=Application
95
123
Icon=${APPDATA_PATH}/icons/windows.svg
96
- @@ -1295 ,13 +1295 ,13 @@ function waConfigureApp() {
124
+ @@ -1290 ,13 +1270 ,13 @@ function waConfigureApp() {
97
125
# Determine the content of the bash script for the application.
98
126
APP_BASH="\
99
127
#!/usr/bin/env bash
@@ -109,18 +137,18 @@ index 6aa9b574..9fbefe65 100755
109
137
Terminal=false
110
138
Type=Application
111
139
Icon=${APP_ICON}
112
- @@ -1631 ,8 +1631 ,8 @@ function waInstall() {
140
+ @@ -1626 ,8 +1606 ,8 @@ function waInstall() {
113
141
waFindInstalled
114
142
115
143
# Install the WinApps bash scripts.
116
144
- $SUDO ln -sf "${SOURCE_PATH}/bin/winapps" "${BIN_PATH}/winapps"
117
145
- $SUDO ln -sf "${SOURCE_PATH}/setup.sh" "${BIN_PATH}/winapps-setup"
118
- +
119
- +
146
+ +
147
+ +
120
148
121
149
# Configure the Windows RDP session application launcher.
122
150
waConfigureWindows
123
- @@ -1682 ,18 +1682 ,15 @@ function waUninstall() {
151
+ @@ -1677 ,18 +1657 ,15 @@ function waUninstall() {
124
152
local DESKTOP_FILE_NAME="" # Stores the name of the '.desktop' file for the application.
125
153
local BASH_SCRIPT_NAME="" # Stores the name of the application.
126
154
@@ -129,7 +157,7 @@ index 6aa9b574..9fbefe65 100755
129
157
- $SUDO rm -f "${BIN_PATH}/winapps-setup"
130
158
-
131
159
# Remove WinApps configuration data, temporary files and logs.
132
- + chmod -R +rw "$USER_APPDATA_PATH"
160
+ + chmod -R +rw "$USER_APPDATA_PATH"
133
161
rm -rf "$USER_APPDATA_PATH"
134
162
135
163
# Remove application icons and shortcuts.
@@ -141,7 +169,7 @@ index 6aa9b574..9fbefe65 100755
141
169
142
170
# Remove each '.desktop' file.
143
171
for DESKTOP_FILE_PATH in "${WINAPPS_DESKTOP_FILES[@]}"; do
144
- @@ -1714 ,7 +1711 ,7 @@ function waUninstall() {
172
+ @@ -1709 ,7 +1686 ,7 @@ function waUninstall() {
145
173
done
146
174
147
175
# Store the paths of bash scripts calling 'WinApps' to launch specific applications in an array, returning an empty array if no such files exist.
@@ -150,7 +178,7 @@ index 6aa9b574..9fbefe65 100755
150
178
151
179
# Remove each bash script.
152
180
for BASH_SCRIPT_PATH in "${WINAPPS_APP_BASH_SCRIPTS[@]}"; do
153
- @@ -1735 ,10 +1732 ,9 @@ function waUninstall() {
181
+ @@ -1730 ,10 +1707 ,9 @@ function waUninstall() {
154
182
done
155
183
156
184
# Print caveats.
0 commit comments