Skip to content

Commit

Permalink
Merge b19b900 into 87bb929
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Nov 17, 2023
2 parents 87bb929 + b19b900 commit cc6862a
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/modes/shellcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,26 @@ export default function() {
esac
}
x() {
case $1 in
"")
if [ -f "${tmp}/shellcode/x.$$" ]; then
if foo="$("${tmp}/shellcode/u.$$")"; then
eval "$foo"
${sh} "${tmp}/shellcode/x.$$"
unset foo
fi
rm "${tmp}/shellcode/"?.$$
else
echo "pkgx: nothing to run" >&2
return 1
fi;;
*)
command pkgx -- "$@";;
esac
}
if ! type x >/dev/null 2>&1; then
x() {
case $1 in
"")
if [ -f "${tmp}/shellcode/x.$$" ]; then
if foo="$("${tmp}/shellcode/u.$$")"; then
eval "$foo"
${sh} "${tmp}/shellcode/x.$$"
unset foo
fi
rm "${tmp}/shellcode/"?.$$
else
echo "pkgx: nothing to run" >&2
return 1
fi;;
*)
command pkgx -- "$@";;
esac
}
fi
env() {
for arg in "$@"; do
Expand Down

0 comments on commit cc6862a

Please sign in to comment.