mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 12:15:06 +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
|
cd ../libexec/bin
|
||||||
fix-shebangs.ts *
|
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
|
chmod +x $CMD_NAME
|
||||||
|
|
||||||
rm Activate.ps1 activate.csh activate.fish
|
rm Activate.ps1 activate.csh activate.fish
|
||||||
|
|
Loading…
Reference in a new issue