Skip to content

Commit

Permalink
fix: change code invocation flow
Browse files Browse the repository at this point in the history
  • Loading branch information
QEDK committed Apr 4, 2024
1 parent a44a368 commit 97eee43
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions availup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ 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 @@ -121,6 +107,20 @@ if [ -z "$identity" ]; then
else
IDENTITY="$identity"
fi
# 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
# check if avail-light version matches!
UPGRADE=0
if [ ! -z "$upgrade" ]; then
Expand Down

0 comments on commit 97eee43

Please sign in to comment.