Commit f7925f7 1 parent da9e5d1 commit f7925f7 Copy full SHA for f7925f7
File tree 11 files changed +21
-17
lines changed
11 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 2
2
set -eu
3
3
shopt -s nullglob
4
4
5
- TAG_PATTERN_TO_BUILD=( " ^ios/" )
5
+ TAG_PATTERN_TO_BUILD=" ^ios/"
6
6
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
7
7
BUILD_DIR=" $SCRIPT_DIR /mullvadvpn-app/ios"
8
8
LAST_BUILT_DIR=" $SCRIPT_DIR /last-built"
@@ -93,6 +93,8 @@ function run_build_loop() {
93
93
94
94
run_git fetch --prune --tags 2> /dev/null || continue
95
95
local tags
96
+
97
+ # shellcheck disable=SC2207
96
98
tags=( $( run_git tag | grep " $TAG_PATTERN_TO_BUILD " ) )
97
99
98
100
for tag in " ${tags[@]} " ; do
Original file line number Diff line number Diff line change @@ -22,9 +22,7 @@ vm_pid=$!
22
22
# Sleep to wait until VM is up
23
23
sleep 10
24
24
25
- # apparently, there's a difference between piping into zsh like this and doing
26
- # a <(echo $SCRIPT).
27
- cat " $SCRIPT " | ssh admin@" $( tart ip " $VM_NAME " ) " bash /dev/stdin
25
+ ssh admin@" $( tart ip " $VM_NAME " ) " bash /dev/stdin < " $SCRIPT "
28
26
script_status=$?
29
27
30
28
kill $vm_pid
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pkill -9 -x "mullvad-gui" || true
10
10
is_number_re=' ^[0-9]+$'
11
11
# Check if we're running during an upgrade step on Fedora
12
12
# https://fedoraproject.org/wiki/Packaging:Scriptlets#Syntax
13
- if [[ " $1 " =~ $is_number_re ]] && [ $1 -gt 0 ]; then
13
+ if [[ " $1 " =~ $is_number_re ]] && [ " $1 " -gt 0 ]; then
14
14
exit 0;
15
15
fi
16
16
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ if [ "${XDG_SESSION_TYPE:-""}" = "wayland" ] && \
13
13
echo " $SUPPORTED_COMPOSITORS " | \
14
14
grep -qi -e " ${XDG_CURRENT_DESKTOP:- " " } " -e " ${XDG_SESSION_DESKTOP:- " " } "
15
15
then
16
- WAYLAND_FLAGS=" --ozone-platform=wayland --enable-features=WaylandWindowDecorations"
16
+ WAYLAND_FLAGS=( " --ozone-platform=wayland" " --enable-features=WaylandWindowDecorations" )
17
17
else
18
- WAYLAND_FLAGS=" "
18
+ WAYLAND_FLAGS=()
19
19
fi
20
20
21
21
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
22
- exec " $SCRIPT_DIR /mullvad-gui" $SANDBOX_FLAG $ WAYLAND_FLAGS " $@ "
22
+ exec " $SCRIPT_DIR /mullvad-gui" " $SANDBOX_FLAG " " ${ WAYLAND_FLAGS[@]} " " $@ "
Original file line number Diff line number Diff line change 5
5
LOG_DIR=/var/log/mullvad-vpn
6
6
7
7
mkdir -p $LOG_DIR
8
- exec 2>&1 > $LOG_DIR /postinstall.log
8
+ exec > $LOG_DIR /postinstall.log 2>&1
9
9
10
10
echo " Running postinstall at $( date) "
11
11
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ INSTALL_DIR=$2
7
7
8
8
mkdir -p $LOG_DIR
9
9
chmod 755 $LOG_DIR
10
- exec 2>&1 > $LOG_DIR /preinstall.log
10
+ exec > $LOG_DIR /preinstall.log 2>&1
11
11
12
12
echo " Running preinstall at $( date) "
13
13
Original file line number Diff line number Diff line change 2
2
3
3
set -ue
4
4
5
- read -p " Are you sure you want to stop and uninstall Mullvad VPN? (y/n) "
5
+ read -r - p " Are you sure you want to stop and uninstall Mullvad VPN? (y/n) "
6
6
if [[ " $REPLY " =~ [Yy]$ ]]; then
7
7
echo " Uninstalling Mullvad VPN ..."
8
8
else
@@ -40,7 +40,7 @@ sudo pkgutil --forget net.mullvad.vpn || true
40
40
echo " Removing login item ..."
41
41
osascript -e ' tell application "System Events" to delete login item "Mullvad VPN"' 2> /dev/null || true
42
42
43
- read -p " Do you want to delete the log and cache files the app has created? (y/n) "
43
+ read -r - p " Do you want to delete the log and cache files the app has created? (y/n) "
44
44
if [[ " $REPLY " =~ [Yy]$ ]]; then
45
45
sudo rm -rf /var/log/mullvad-vpn /var/root/Library/Caches/mullvad-vpn /Library/Caches/mullvad-vpn
46
46
for user in /Users/* ; do
@@ -52,7 +52,7 @@ if [[ "$REPLY" =~ [Yy]$ ]]; then
52
52
done
53
53
fi
54
54
55
- read -p " Do you want to delete the Mullvad VPN settings? (y/n) "
55
+ read -r - p " Do you want to delete the Mullvad VPN settings? (y/n) "
56
56
if [[ " $REPLY " =~ [Yy]$ ]]; then
57
57
sudo rm -rf /etc/mullvad-vpn
58
58
for user in /Users/* ; do
Original file line number Diff line number Diff line change @@ -38,4 +38,5 @@ WIREGUARD_KIT_GO_PATH="$RESOLVED_SOURCE_PACKAGES_PATH/checkouts/wireguard-apple/
38
38
echo " WireGuardKitGo path resolved to $WIREGUARD_KIT_GO_PATH "
39
39
40
40
# Run make
41
- /usr/bin/make -C " $WIREGUARD_KIT_GO_PATH " $ACTION
41
+ # shellcheck disable=SC2086
42
+ /usr/bin/make -C " $WIREGUARD_KIT_GO_PATH " $ACTION
Original file line number Diff line number Diff line change 5
5
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
6
6
cd " $SCRIPT_DIR "
7
7
8
+ # shellcheck disable=SC1091
8
9
source utils/log
9
10
10
11
function main {
@@ -106,6 +107,8 @@ function download_from_crowdin {
106
107
function verify {
107
108
sync_localizations
108
109
git diff
110
+
111
+ # shellcheck disable=SC2251
109
112
! git status -s | grep .
110
113
local out_of_sync=$?
111
114
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ function run_tests_for_os {
196
196
197
197
RUST_LOG=debug cargo run --bin test-manager \
198
198
run-tests \
199
- --account " ${ACCOUNT_TOKEN} " \
199
+ --account " ${ACCOUNT_TOKEN:? Error : ACCOUNT_TOKEN not set } " \
200
200
--current-app " ${cur_filename} " \
201
201
--previous-app " ${prev_filename} " \
202
202
--test-report " $SCRIPT_DIR /.ci-logs/${os} _report" \
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ for arch in ${ARCHITECTURES:-armv7 aarch64 x86_64 i686}; do
41
41
esac
42
42
43
43
# Build Wireguard-Go
44
- echo " $( pwd) "
44
+ pwd
45
45
make -f Android.mk clean
46
46
make -f Android.mk
47
47
@@ -51,7 +51,7 @@ for arch in ${ARCHITECTURES:-armv7 aarch64 x86_64 i686}; do
51
51
52
52
# Create the directories with RWX permissions for all users so that the build server can clean
53
53
# the directories afterwards
54
- mkdir -m 777 -p " $( dirname " $STRIPPED_LIB_PATH " ) "
54
+ (umask ugo=rwx ; mkdir -p " $( dirname " $STRIPPED_LIB_PATH " ) " )
55
55
56
56
$ANDROID_STRIP_TOOL --strip-unneeded --strip-debug -o " $STRIPPED_LIB_PATH " " $UNSTRIPPED_LIB_PATH "
57
57
You can’t perform that action at this time.
0 commit comments