Return to repo list

stctpw

Portage-compatible patch maker for suckless tools.
Return to HMagellan.com

commit 642ff52b460f7c3b8c1b66a11f86089d86c33824
parent 37790e73153d0996cfbdf25033b5ac3438326e66
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Wed, 29 Jul 2020 00:44:14 -0500

fixed cleanup and diff file handling

Diffstat:
Mstctpw.sh | 22++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/stctpw.sh b/stctpw.sh @@ -2,7 +2,7 @@ # Vars MODFILE="$HOME/config.def.h" - +CURRENT_DIR=$PWD ARG='' TARGETDISTFILES='' FETCHWEB=0 @@ -74,14 +74,16 @@ if [[ $FETCHWEB -ne 1 ]]; then done if [[ $numlines -ge 2 ]]; then multidistfileprompt $TARGETDISTFILES - else - tar -xvzf /var/cache/distfiles/$TARGETDISTFILES - cp $TARGETDISTFILES a - cp $TARGETDISTFILES b - mv $MODFILE b/config.def.h - diff -up a b > config.patch - if [[ $INSTALLPATCH -eq 1 ]]; then - echo "Will install" - fi fi + tar -xvzf /var/cache/distfiles/$TARGETDISTFILES + cp $TARGETDISTFILES a + cp $TARGETDISTFILES b + cp $MODFILE b/config.def.h + diff -up a b > $CURRENT_DIR/config.patch + if [[ $INSTALLPATCH -eq 1 ]]; then + echo "Will install" + fi + cd /var/tmp + rm -rd stctpw fi +unset numlines