summaryrefslogtreecommitdiffstats
path: root/scripts/check-patchlist.sh
diff options
context:
space:
mode:
authorThorsten Leemhuis <fedora@leemhuis.info>2021-03-07 13:25:32 +0100
committerThorsten Leemhuis <fedora@leemhuis.info>2021-03-07 13:32:55 +0100
commitfb72952d5b63e40f63bfa1e3a5bce2262c424197 (patch)
treed1a9bf30437653b57b398fd3b4f3fb4897ca29cd /scripts/check-patchlist.sh
parentb9488a288ec844af97a516ac9ffe441221f6e67d (diff)
parent3422e04a2e31dba3e17af206f160d4fc409f4250 (diff)
downloadkernel-5.11.4-125.vanilla.1.fc32.tar.gz
kernel-5.11.4-125.vanilla.1.fc32.tar.xz
kernel-5.11.4-125.vanilla.1.fc32.zip
:merge origin/stabilization and update to 5.10.4kernel-5.11.4-125.vanilla.1.fc33kernel-5.11.4-125.vanilla.1.fc32
Diffstat (limited to 'scripts/check-patchlist.sh')
-rwxr-xr-xscripts/check-patchlist.sh113
1 files changed, 0 insertions, 113 deletions
diff --git a/scripts/check-patchlist.sh b/scripts/check-patchlist.sh
deleted file mode 100755
index 134e41e97..000000000
--- a/scripts/check-patchlist.sh
+++ /dev/null
@@ -1,113 +0,0 @@
-#! /bin/sh
-# This script was created in a effort to make patch management a bit easier.
-# It list all the patches in the current tree and identifies if they are
-# present in the kernel.spec, PatchList.txt, both files or neither.
-#
-# eg. ./check-patchlist.sh [optional flag]
-
-function usage(){
- echo "List all the patches currently in the tree. It also helps identify"
- echo "if the patch is present in kernel.spec or PatchList.txt. "
- echo "-h, --help "
- echo "-t, --tracked patches in both kernel.spec and PatchList.txt "
- echo "-p, --patchlist patches added to PatchList.txt. "
- echo "-s, --specfile patches added to kernel.spec. "
- echo "-n, --not-tracked patches in the tree but not in PatchList.txt "
- echo " or kernel.spec "
-}
-
-BASEDIR=$(dirname "$( cd $(dirname $BASH_SOURCE[0]) && pwd)")
-pushd $BASEDIR > /dev/null
-
-function list_all(){
- echo "===========Legend==========================="
- echo ". In kernel.spec "
- echo "* In PatchList.txt "
- echo "+ In PatchList.txt & Kernel.spec "
- echo "- Neither in PatchList.txt nor kernel.spec"
- echo "============================================"
- for patch in $(ls *.patch); do
- if [ ! -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
- then
- echo "+ ${patch}" # Patches in kernel.spec and PatchList.txt
-
- elif [ ! -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ]
- then
- echo "* ${patch}" # Patches in PatchList.txt but not in kernel.spec
-
- elif [ -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
- then
- echo ". ${patch}" # Patches in kernel.spec but not in PatchList.txt
-
- else
- echo "- ${patch}" # Neither in PatchList.txt nor kernel.spec
-
- fi
- done
-}
-
-function list_present_not_added(){
- for patch in $(ls *.patch); do
- if [ -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ]
- then
- echo $patch
- fi
- done
-}
-
-function list_present_added(){
- for patch in $(ls *.patch); do
- if [ ! -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
- then
- echo $patch
- fi
- done
-}
-
-function list_patchList(){
- for patch in $(ls *.patch); do
- if [ ! -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ]
- then
- echo $patch
- fi
- done
-
-}
-function list_specfile(){
- for patch in $(ls *.patch); do
- if [ -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
- then
- echo $patch
- fi
- done
-}
-
-if [ -z "$@" ]; then
- list_all
-else
-
- for opt in "$@"; do
- case $opt in
- -t|--tracked)
- list_present_added
- ;;
- -s|--specfile)
- list_specfile
- ;;
- -h|--help)
- usage
- ;;
- -n|--not-added)
- list_present_not_added
- ;;
- -p|--patchlist)
- list_patchList
- ;;
- *)
- usage
- ;;
- esac
- done
-fi
-
-popd > /dev/null