mirror of
https://github.com/RetroPie/RetroPie-Setup.git
synced 2025-04-02 10:51:41 -04:00
19 lines
407 B
Bash
Executable file
19 lines
407 B
Bash
Executable file
#!/bin/bash
|
|
DEVICE="$1"
|
|
DEST="$2"
|
|
if [[ -z "$DEVICE" ]] || [[ -z "$DEST" ]]; then
|
|
echo "$0 DEVICE/umount MOUNTPOINT"
|
|
exit 1
|
|
fi
|
|
if [[ $(id -u) -ne 0 ]]; then
|
|
printf "Script must be run as root."
|
|
exit 1
|
|
fi
|
|
if [[ "$DEVICE" == "umount" ]]; then
|
|
umount "$DEST/boot"
|
|
umount "$DEST"
|
|
else
|
|
DEVICE=$(readlink -f "$DEVICE")
|
|
mount ${DEVICE}2 "$DEST"
|
|
mount ${DEVICE}1 "$DEST/boot"
|
|
fi
|