blob: ea48d4a5fb25fbb59eace429cd3c96cfb64ff787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
# Script to copy install binary to D:/mrpackages and eject the drive
# Copy the install binary
cp target/Update_KGameOfLife_GameOfLife_install.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 "Install binary copied to D:/mrpackages and drive ejected (if supported)."
|