Skip to content

Commit

Permalink
pak install
Browse files Browse the repository at this point in the history
  • Loading branch information
joknarf committed Oct 6, 2024
1 parent 22d0467 commit 5cd7865
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thefly
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ case "$1" in
(\cd "$FLY_HOME/.fly.d" && git submodule add "$_fgithub/$1" "plugins/${1##*/}" 2>/dev/null)
} || (\cd "$FLY_HOME/.fly.d/plugins" && git clone "$_fgithub/$1" -q >/dev/null)
(\cd "$FLY_HOME/.fly.d" && git config -f ".gitmodules submodule.plugins/${1##*/}.shallow" true >/dev/null 2>/dev/null)
set --
. "$_flib/.source_plugins" "${1#*/}"
;;
del)
Expand Down Expand Up @@ -304,7 +305,7 @@ function _fpackage

function _fxpackage
{
printf 'FLY_HOME="%s";' "$_ftmpdir"
printf '[ "$1" = install ] && FLY_HOME="$HOME" || FLY_HOME="%s";' "$_ftmpdir"
printf 'type gtar >/dev/null 2>&1 && _ftar=gtar || _ftar=tar;'
printf 'umask 077;mkdir -p "$FLY_HOME";'
printf '! chmod 700 "$FLY_HOME" && echo "Not owner of $FLY_HOME. Abort" >&2 && exit 1;'
Expand Down Expand Up @@ -407,10 +408,10 @@ function _fly
;;
pack)
cat - <<_EOF_
FLY_HOME="$_ftmpdir"
cat - <<_EOPACK_ |base64 -d |($(_fxpackage))
$(_fpackage |base64)
_EOPACK_
[ "\$1" = install ] && FLY_HOME="\$HOME" && shift || FLY_HOME="$_ftmpdir"
_fdestshell="\$1" . \$FLY_HOME/.fly.d//fly loginshell \$FLY_HOME
_EOF_
;;
Expand Down

0 comments on commit 5cd7865

Please sign in to comment.