mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 10:35:17 +03:00
Write shim file
This commit is contained in:
parent
2a1c711f02
commit
abe2f46ecd
|
@ -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