File tree 1 file changed +20
-11
lines changed 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change 3
3
# Get the directory of the script to work from.
4
4
DIR=$( dirname " $0 " )
5
5
6
- if [ " $( uname) " = " Darwin" ]; then
7
- # Run the Mac Version
8
- $DIR /rewatch-macos.exe $@
9
- elif [ " $( expr substr $( uname -s) 1 5) " = " Linux" ]; then
10
- # Run the Linux Version
11
- elif [ " $( expr substr $( uname -m) 1 7) " = " aarch64" ]; then
12
- # Run the Linux ARM64 Version
13
- $DIR /rewatch-linux-arm64.exe $@
14
- else
15
- $DIR /rewatch-linux.exe $@
6
+ # Detect platform and architecture
7
+ PLATFORM=$( uname -s)
8
+ ARCH=$( uname -m)
9
+
10
+ if [ " $PLATFORM " = " Darwin" ]; then
11
+ # macOS
12
+ $DIR /rewatch-macos " $@ "
13
+ elif [ " $PLATFORM " = " Linux" ]; then
14
+ # Linux
15
+ if [ " $ARCH " = " arm64" ] || [ " $ARCH " = " aarch64" ]; then
16
+ # ARM64 architecture
17
+ $DIR /rewatch-linux-arm64 " $@ "
18
+ else
19
+ # Other architectures (x86_64, etc.)
20
+ $DIR /rewatch-linux " $@ "
16
21
fi
22
+ elif echo " $PLATFORM " | grep -i " MINGW\|MSYS\|CYGWIN" > /dev/null; then
23
+ # Windows (when running in Git Bash, MSYS2, Cygwin, etc.)
24
+ $DIR /rewatch.exe " $@ "
17
25
else
18
- echo " No release available for '$( uname ) '"
26
+ echo " No release available for '$PLATFORM '"
19
27
exit 1
20
28
fi
29
+
You can’t perform that action at this time.
0 commit comments