Skip to content

Commit ca8fe59

Browse files
committed
Fix sudo
1 parent 3e4d2e8 commit ca8fe59

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

.github/workflows/Tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
if: ${{ needs.release.outputs.updated }}
4444
steps:
4545
- name: Wait for CDN refreshment
46-
run: sleep 30s
46+
run: sleep 1m
4747

4848
test-ubuntu-install:
4949
needs: wait-for-cdn

swiftbox.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
#!/bin/bash
22

3-
SWIFTBOX_VERSION="0.9.1"
3+
SWIFTBOX_VERSION="0.9.2"
44
INSTALL_DIR="/usr/bin"
55

6+
if [ `id -u` = 0 ]
7+
then
8+
WORKING_DIR="/opt/swiftbox"
9+
ANOTHER_WD="$HOME/.swiftbox"
10+
else
11+
WORKING_DIR="$HOME/.swiftbox"
12+
ANOTHER_WD="/opt/swiftbox"
13+
if hash sudo 2> /dev/null
14+
then
15+
SUDO_FLAG="sudo"
16+
fi
17+
fi
18+
619
if [ -f /etc/redhat-release ]
720
then
821
REDHAT_RELEASE=`cat /etc/redhat-release`
@@ -275,19 +288,6 @@ ensure-env() {
275288
fi
276289
}
277290

278-
if [ `id -u` = 0 ]
279-
then
280-
WORKING_DIR="/opt/swiftbox"
281-
ANOTHER_WD="$HOME/.swiftbox"
282-
else
283-
WORKING_DIR="$HOME/.swiftbox"
284-
ANOTHER_WD="/opt/swiftbox"
285-
if hash sudo 2> /dev/null
286-
then
287-
SUDO_FLAG="sudo"
288-
fi
289-
fi
290-
291291
if [ $# = 0 ]
292292
then
293293
echo "Please specify a command. "

0 commit comments

Comments
 (0)