Write shim file

This commit is contained in:
James Reynolds 2022-12-01 11:30:51 -07:00
parent 2a1c711f02
commit abe2f46ecd

View file

@ -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