mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-15 14:20:53 +00:00
put shebang in scripts
This commit is contained in:
committed by
Fredrik Fornwall
parent
2f90522ad3
commit
aa605e8901
@@ -70,7 +70,8 @@ termux_step_post_massage () {
|
||||
|
||||
termux_step_create_debscripts () {
|
||||
## POST INSTALL:
|
||||
echo 'echo "Setting up pip..."' > postinst
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo 'echo "Setting up pip..."' >> postinst
|
||||
# Fix historical mistake which removed bin/pip but left site-packages/pip-*.dist-info,
|
||||
# which causes ensurepip to avoid installing pip due to already existing pip install:
|
||||
echo "if [ ! -f $TERMUX_PREFIX/bin/pip -a -d $TERMUX_PREFIX/lib/python${_MAJOR_VERSION}/site-packages/pip-*.dist-info ]; then rm -Rf $TERMUX_PREFIX/lib/python${_MAJOR_VERSION}/site-packages/pip-*.dist-info ; fi" >> postinst
|
||||
@@ -78,8 +79,9 @@ termux_step_create_debscripts () {
|
||||
echo "$TERMUX_PREFIX/bin/python -m ensurepip --upgrade --default-pip" >> postinst
|
||||
|
||||
## PRE RM:
|
||||
# Avoid running on update:
|
||||
echo 'if [ $1 != "remove" ]; then exit 0; fi' > prerm
|
||||
# Avoid running on update
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > prerm:
|
||||
echo 'if [ $1 != "remove" ]; then exit 0; fi' >> prerm
|
||||
# Uninstall everything installed through pip:
|
||||
echo "pip freeze 2> /dev/null | xargs pip uninstall -y > /dev/null 2> /dev/null" >> prerm
|
||||
# Cleanup __pycache__ folders:
|
||||
|
||||
Reference in New Issue
Block a user