put shebang in scripts
This commit is contained in:
parent
8ceb581ba6
commit
c2a0bc2bab
@ -12,7 +12,8 @@ TERMUX_PKG_EXTRA_MAKE_ARGS="MULTI=1"
|
||||
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
|
||||
|
@ -43,7 +43,8 @@ termux_step_post_make_install() {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -24,7 +24,8 @@ termux_step_pre_configure () {
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -10,7 +10,8 @@ termux_step_pre_configure() {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
@ -59,5 +59,6 @@ termux_step_make_install () {
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo 'mkdir -p $HOME/.mpd/playlists' >> postinst
|
||||
}
|
||||
|
@ -70,7 +70,8 @@ termux_step_post_make_install () {
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -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:
|
||||
|
@ -77,7 +77,8 @@ termux_step_post_massage () {
|
||||
|
||||
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
|
||||
@ -85,8 +86,9 @@ termux_step_create_debscripts () {
|
||||
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
|
||||
|
@ -56,15 +56,17 @@ termux_step_make() {
|
||||
|
||||
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
|
||||
@ -84,7 +86,8 @@ termux_step_create_debscripts () {
|
||||
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
|
||||
|
@ -44,7 +44,8 @@ termux_step_post_make_install () {
|
||||
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user