kopia lustrzana https://github.com/km4ack/pi-build
update
rodzic
a4567fc67c
commit
d84a395a3a
|
@ -4,12 +4,6 @@
|
||||||
#template for future patch scripts.
|
#template for future patch scripts.
|
||||||
#20210805 KM4ACK
|
#20210805 KM4ACK
|
||||||
|
|
||||||
HEADER(){
|
|
||||||
clear;echo;echo "====================="
|
|
||||||
echo "Build a Pi Patch Tool"
|
|
||||||
echo "====================="
|
|
||||||
}
|
|
||||||
|
|
||||||
#Give this patch a unique name. A good idea is
|
#Give this patch a unique name. A good idea is
|
||||||
#to give it the application name that is being
|
#to give it the application name that is being
|
||||||
#patched followed by the date. ie FLDIDI20210805
|
#patched followed by the date. ie FLDIDI20210805
|
||||||
|
@ -18,20 +12,17 @@ PATCHNAME=test-patch20210805
|
||||||
|
|
||||||
PATCHFILE=$HOME/.config/patch
|
PATCHFILE=$HOME/.config/patch
|
||||||
touch $PATCHFILE
|
touch $PATCHFILE
|
||||||
|
###############################
|
||||||
#check to see if patch already applied
|
#Patch script commands go here#
|
||||||
PATCHCHECK=$(grep "$PATCHNAME" $PATCHFILE)
|
###############################
|
||||||
|
|
||||||
if [ -z $PATCHCHECK ]; then
|
|
||||||
#if patch hasn't been applied before, apply it now
|
|
||||||
clear;echo;echo
|
clear;echo;echo
|
||||||
echo "This is a test patch"
|
echo "This is a test patch"
|
||||||
#write patch name to a file so we can
|
|
||||||
#look and see if it has been applied before.
|
|
||||||
echo "$PATCHNAME" >> $PATCHFILE
|
|
||||||
|
|
||||||
else
|
|
||||||
#if patch previously applied, notify user and exit
|
#############################################
|
||||||
echo "$PATCHNAME already applied to this system"
|
#write patch name to a file so we can #
|
||||||
exit 1
|
#look and see if it has been applied before.#
|
||||||
fi
|
#This is checked by the patch-menu script #
|
||||||
|
#before running the patch #
|
||||||
|
#############################################
|
||||||
|
echo "$PATCHNAME" >> $PATCHFILE
|
||||||
|
|
Ładowanie…
Reference in New Issue