From d7bfcace13d9929e8e8e821cec562a42c8f1f1c5 Mon Sep 17 00:00:00 2001 From: LukeeGD <26163116+LukeZGD@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:00:55 +0800 Subject: [PATCH] Use ~ instead of $HOME for running pyenv/python --- restore.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/restore.sh b/restore.sh index 3344420..c49dbfc 100755 --- a/restore.sh +++ b/restore.sh @@ -1786,10 +1786,10 @@ device_ipwndfu() { local tool_pwned=0 local python2=$(command -v python2 2>/dev/null) local pyenv=$(command -v pyenv 2>/dev/null) - local pyenv2="$HOME/.pyenv/versions/2.7.18/bin/python2" + local pyenv2=~/.pyenv/versions/2.7.18/bin/python2 - if [[ -z $pyenv && -e "$HOME/.pyenv/bin/pyenv" ]]; then - pyenv="$HOME/.pyenv/bin/pyenv" + if [[ -z $pyenv && -e ~/.pyenv/bin/pyenv ]]; then + pyenv=~/.pyenv/bin/pyenv fi if [[ $platform == "macos" ]] && (( mac_majver < 12 )); then python2="/usr/bin/python" @@ -1807,7 +1807,7 @@ device_ipwndfu() { print "* Install pyenv by running: curl https://pyenv.run | bash" log "Installing pyenv" curl https://pyenv.run | bash - pyenv="$HOME/.pyenv/bin/pyenv" + pyenv=~/.pyenv/bin/pyenv if [[ ! -e $pyenv ]]; then error "Cannot detect pyenv, its installation may have failed." \ "* Try installing pyenv manually before retrying."