output installer permissions message after version check
This commit is contained in:
parent
ac54438fbe
commit
3f535d15e0
1 changed files with 15 additions and 15 deletions
|
@ -88,21 +88,6 @@ if [ -z "$need_sudo" ] && [ -e "$install_dir/f" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$use_sudo" -eq 0 ] && [ -n "$need_sudo" ]; then
|
||||
printf "%s is not writable. Permissions will be requested with sudo.\n" "$need_sudo"
|
||||
use_sudo=1
|
||||
fi
|
||||
|
||||
SUDOCMD=""
|
||||
if [ -n "$need_sudo" ]; then
|
||||
if [ "$use_sudo" -eq 1 ]; then
|
||||
SUDOCMD=sudo
|
||||
else
|
||||
echo "error: '$need_sudo' is not writable."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# prompt for nightly build option if interactive
|
||||
if [ "$nightly" -eq 0 ] && [ "$have_term" -eq 1 ]; then
|
||||
printf "do you want to install a Nightly build? [y/N]: "
|
||||
|
@ -172,6 +157,21 @@ if [ "$force_update" -eq 0 ] && [ -e "$install_dir/flow" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$use_sudo" -eq 0 ] && [ -n "$need_sudo" ]; then
|
||||
printf "%s is not writable. Permissions will be requested with sudo.\n" "$need_sudo"
|
||||
use_sudo=1
|
||||
fi
|
||||
|
||||
SUDOCMD=""
|
||||
if [ -n "$need_sudo" ]; then
|
||||
if [ "$use_sudo" -eq 1 ]; then
|
||||
SUDOCMD=sudo
|
||||
else
|
||||
echo "error: '$need_sudo' is not writable."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# construct download url
|
||||
# note: nightly assets are named like "flow-<version>-<os>-<arch>.<ext>"
|
||||
filename="flow-$version-$os-$arch"
|
||||
|
|
Loading…
Add table
Reference in a new issue