mirror of
https://github.com/ivabus/pantry
synced 2024-11-27 02:35:08 +03:00
Write shim file
This commit is contained in:
parent
2a1c711f02
commit
abe2f46ecd
1 changed files with 13 additions and 1 deletions
|
@ -18,7 +18,19 @@ ln -s ../libexec/bin/$CMD_NAME $CMD_NAME
|
|||
cd ../libexec/bin
|
||||
fix-shebangs.ts *
|
||||
|
||||
cp "$SRCROOT"/props/shim.bash $CMD_NAME
|
||||
cat <<EOF>$CMD_NAME
|
||||
#!/usr/bin/env bash
|
||||
self="\${BASH_SOURCE[0]}"
|
||||
if test -L "\$self"; then
|
||||
prefix="\$(dirname "\$self")"
|
||||
suffix="\$(dirname \$(readlink \$self))"
|
||||
LIBEXEC="\$(cd \$prefix/\$suffix && pwd)"
|
||||
else
|
||||
LIBEXEC="\$(cd "\$(dirname "\$self")" && pwd)"
|
||||
fi
|
||||
source "\$LIBEXEC/activate"
|
||||
exec "\$LIBEXEC"/$CMD_NAME.py "\$@"
|
||||
EOF
|
||||
chmod +x $CMD_NAME
|
||||
|
||||
rm Activate.ps1 activate.csh activate.fish
|
||||
|
|
Loading…
Reference in a new issue