aboutsummaryrefslogtreecommitdiff
path: root/uninstall.sh
diff options
context:
space:
mode:
authornotori <188390306+n0tori@users.noreply.github.com>2025-03-13 12:28:08 +0000
committernotori <188390306+n0tori@users.noreply.github.com>2025-03-13 12:28:08 +0000
commit3f80ccbfc0dd2f3b4295e506e7ce5931b720e2ee (patch)
tree17b44f56b7aaec5247dbed939e2f567a55b83ce0 /uninstall.sh
project files
Diffstat (limited to 'uninstall.sh')
-rw-r--r--uninstall.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/uninstall.sh b/uninstall.sh
new file mode 100644
index 0000000..66e7fbd
--- /dev/null
+++ b/uninstall.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Script to copy uninstall binary to D:/mrpackages and eject the drive
+
+# Copy the uninstall binary
+cp target/Update_KGameOfLife_GameOfLife_uninstall.bin D:/mrpackages/
+
+# Eject the drive
+if [[ "$OSTYPE" == "linux-gnu"* ]]; then
+ # Linux
+ eject D:
+elif [[ "$OSTYPE" == "darwin"* ]]; then
+ # macOS
+ diskutil eject D:
+elif [[ "$OSTYPE" == "msys"* ]] || [[ "$OSTYPE" == "cygwin"* ]] || [[ "$OSTYPE" == "win32"* ]]; then
+ # Windows
+ powershell -command "& {(New-Object -comObject Shell.Application).Namespace(17).ParseName('D:').InvokeVerb('Eject')}"
+else
+ echo "Unsupported OS for drive ejection. Please eject drive D: manually."
+fi
+
+echo "Uninstall binary copied to D:/mrpackages and drive ejected (if supported)." \ No newline at end of file