Open coolaj86 opened 2 years ago
Obviously it's a dumb idea to embed a script in a heredoc of another script.
We need a different solution for _webi/bootstrap.sh, and it may require a shudder build step... 😬
_webi/bootstrap.sh
How about we just make the webi command its own command and installer, just like ssh-adduser?
webi
ssh-adduser
Or maybe even host it on GitHub releases so it gets its own version?
Maybe just check if the downloaded version is more than 5 minutes old? (bad idea)
Run if WEBI_INSTALL=true is not set. 👍
WEBI_INSTALL=true
webi webi and webi update should manually update webi, regardless of version.
webi webi
webi update
if command -v curl > /dev/null 2> /dev/null; then if ! curl -fsSL "$my_installer_url" -H "User-Agent: curl $WEBI_UA" \ -o "$WEBI_BOOT/$my_package-bootstrap.sh"; then echo >&2 "error fetching '$my_installer_url'" exit 1 fi else if ! wget -q "$my_installer_url" --user-agent="wget $WEBI_UA" \ -O "$WEBI_BOOT/$my_package-bootstrap.sh"; then echo >&2 "error fetching '$my_installer_url'" exit 1 fi fi
webi_download \ "$WEBI_HOST/packages/${my_cmd}/${my_cmd}.sh" \ "$HOME/.local/bin/${my_cmd}"
Obviously it's a dumb idea to embed a script in a heredoc of another script.
We need a different solution for
_webi/bootstrap.sh
, and it may require a shudder build step... 😬Thoughts
How about we just make the
webi
command its own command and installer, just likessh-adduser
?Or maybe even host it on GitHub releases so it gets its own version?
Maybe just check if the downloaded version is more than 5 minutes old? (bad idea)
Run if
WEBI_INSTALL=true
is not set. 👍Implementation thoughts
webi webi
andwebi update
should manually update webi, regardless of version.