Skip to content

Commit

Permalink
feat: implement WSL custom behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed Apr 4, 2024
1 parent 61710ae commit a44a368
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion availup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ while [ $# -gt 0 ]; do
fi
shift
done
# handle WSL systems
if uname -r | grep -qEi "(Microsoft|WSL)"; then
# force remove IO lock
if [ -d "$HOME/.avail/data" ]; then
rm -rf $HOME/.avail/data
mkdir $HOME/.avail/data
fi
if [ $"force_wsl" != 'y']; then
echo "👀 WSL detected. This script is not fully compatible with WSL. Please download the Windows runner instead by clicking this link: https://github.com/availproject/avail-light/releases/download/v1.7.10/avail-light-windows-runner.zip Alternatively, rerun the command with --force_wsl y"
exit 1
else
echo "👀 WSL detected. The binary is not fully compatible with WSL but forcing the run anyway."
fi
fi
# generate folders if missing
if [ ! -d "$HOME/.avail" ]; then
mkdir $HOME/.avail
Expand Down Expand Up @@ -126,7 +140,7 @@ if [ ! -z "$upgrade" ]; then
fi
fi
fi
else
else
if [ -f $AVAIL_BIN ]; then
CURRENT_VERSION="v$($HOME/.avail/bin/avail-light --version | cut -d " " -f 2)"
if [ "$CURRENT_VERSION" = "v1.7.9" ]; then
Expand Down

0 comments on commit a44a368

Please sign in to comment.