Updating nerdctl script to use sh instead of bash

sh is required for WSL while bash is not. This makes the script
more widely usable

Signed-off-by: Matt Farina <matt.farina@suse.com>
This commit is contained in:
Matt Farina
2021-10-07 16:41:32 -04:00
parent 56f51eb8cc
commit 29274197e8

View File

@@ -1,11 +1,10 @@
#!/bin/bash
set -eu -o pipefail
#!/bin/sh
if [[ $(cat /proc/version | grep -i Microsoft) ]]; then
if grep -q -i 'microsoft.*wsl' /proc/version; then
exec /mnt/wsl/rancher-desktop/bin/nerdctl "$@"
else
limaloc="${XDG_DATA_HOME:-$HOME/.local/share/rancher-desktop}"
scriptname="${BASH_SOURCE[0]}"
limaloc="${XDG_DATA_HOME:-$HOME/.local/share}/rancher-desktop"
scriptname="$0"
while [ -L "${scriptname}" ]; do
scriptname="$(readlink "${scriptname}")"
done