TERMUX_PKG_BUILD_IN_SRC="yes"
termux_step_create_debscripts () {
- echo "mkdir -p $TERMUX_PREFIX/etc/dropbear" >> postinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "mkdir -p $TERMUX_PREFIX/etc/dropbear" >> postinst
echo "for a in rsa dss ecdsa; do" >> postinst
echo " KEYFILE=$TERMUX_PREFIX/etc/dropbear/dropbear_\${a}_host_key" >> postinst
echo " test ! -f \$KEYFILE && dropbearkey -t \$a -f \$KEYFILE" >> postinst
}
termux_step_create_debscripts () {
- echo "dot -c" > postinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "dot -c" >> postinst
echo "exit 0" >> postinst
chmod 0755 postinst
}
termux_step_create_debscripts () {
echo "interest-noawait $TERMUX_PREFIX/share/man" > triggers
-
- echo "makewhatis -Q" > postinst
+
+ echo "#!$TERMUX_PREFIX/bin/sh" >> postinst
+ echo "makewhatis -Q" >> postinst
echo "exit 0" >> postinst
}
}
termux_step_create_debscripts () {
- echo "mkdir -p $TERMUX_PREFIX/var/mlocate/" > postinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "mkdir -p $TERMUX_PREFIX/var/mlocate/" >> postinst
echo "exit 0" >> postinst
chmod 0755 postinst
}
}
termux_step_create_debscripts() {
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo 'mkdir -p $HOME/.mpd/playlists' >> postinst
}
}
termux_step_create_debscripts () {
- echo "mkdir -p \$HOME/.ssh" > postinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "mkdir -p \$HOME/.ssh" >> postinst
echo "touch \$HOME/.ssh/authorized_keys" >> postinst
echo "chmod 700 \$HOME/.ssh" >> postinst
echo "chmod 600 \$HOME/.ssh/authorized_keys" >> postinst
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
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:
termux_step_create_debscripts () {
## POST INSTALL:
- echo "echo 'Setting up pip2...'" > postinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "echo 'Setting up pip2...'" >> postinst
# Fix historical mistake which removed bin/pip2 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/pip2 -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
echo "$TERMUX_PREFIX/bin/python2 -m ensurepip --upgrade --no-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 "pip2 freeze 2> /dev/null | xargs pip2 uninstall -y > /dev/null 2> /dev/null" >> prerm
# Cleanup __pycache__ folders
termux_step_create_debscripts () {
# Clean texlive's folder if needed (run on upgrade)
- echo "if [ ! -f $TERMUX_PREFIX/opt/texlive/2016/install-tl -a ! -f $TERMUX_PREFIX/opt/texlive/2017/install-tl ]; then exit 0; else echo 'Removing residual files from old version of TeX Live for Termux'; fi" > preinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > preinst
+ echo "if [ ! -f $TERMUX_PREFIX/opt/texlive/2016/install-tl -a ! -f $TERMUX_PREFIX/opt/texlive/2017/install-tl ]; then exit 0; else echo 'Removing residual files from old version of TeX Live for Termux'; fi" >> preinst
echo "rm -rf $TERMUX_PREFIX/etc/profile.d/texlive.sh" >> preinst
echo "rm -rf $TERMUX_PREFIX/opt/texlive/2016" >> preinst
# Let's not delete the previous texmf-dist so that people who have installed a full distribution won't need to download everything again
echo "rm -rf $TERMUX_PREFIX/opt/texlive/2017/!(texmf-dist)" >> preinst
echo "exit 0" >> preinst
chmod 0755 preinst
-
- echo "mkdir -p $TL_ROOT/{tlpkg/{backups,tlpobj},texmf-var/{web2c,tex/generic/config}}" > postinst
+
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "mkdir -p $TL_ROOT/{tlpkg/{backups,tlpobj},texmf-var/{web2c,tex/generic/config}}" >> postinst
echo "export PATH=\$PATH:$TL_BINDIR" >> postinst
echo "echo Updating tlmgr" >> postinst
echo "tlmgr update --self" >> postinst
chmod 0755 postinst
# Remove all files installed through tlmgr on removal
- echo 'if [ $1 != "remove" ]; then exit 0; fi' > prerm
+ echo "#!$TERMUX_PREFIX/bin/sh" > prerm
+ echo 'if [ $1 != "remove" ]; then exit 0; fi' >> prerm
#echo "tlmgr remove --dry-run "
echo "echo Running texlinks --unlink" >> prerm
echo "texlinks --unlink" >> prerm
termux_step_create_debscripts () {
# For already installed packages:
- echo "chmod 700 $TERMUX_PREFIX/share/zsh" > postinst
+ echo "#!$TERMUX_PREFIX/bin/sh" > postinst
+ echo "chmod 700 $TERMUX_PREFIX/share/zsh" >> postinst
echo "exit 0" >> postinst
chmod 0755 postinst
}