delete extension names of scripts

This commit is contained in:
2025-09-24 18:33:20 +02:00
parent eccc63e44a
commit 5aec24f542
24 changed files with 44 additions and 38 deletions

33
.scripts/wsl-mount Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
"issu" && {
echo "Do not run this script in sudo mode."
exit 1
}
[ -z "$1" ] && echo "Usage: $0 <VHDX_PATH>" && exit 1
vhdx_path="$1"
[ -z "$2" ] && mount_point="/mnt/wsl" || mount_point="$2"
[ -d "$mount_point" ] || sudo mkdir -p "$mount_point"
username=$(whoami)
sudo chown "$username:$username" "$mount_point"
export LIBGUESTFS_BACKEND=direct
# replay log
# qemu-img check -r all "$VHDX_PATH" || {
# echo "Failed to check VHDX file."
# exit 1
# }
guestmount --add "$vhdx_path" --inspector --ro "$mount_point" || {
echo "Failed to mount VHDX file."
exit 1
}
echo "Successfully mounted $vhdx_path to $mount_point"