Add git-edit-readme.sh

This commit is contained in:
Brian Read 2024-10-27 12:07:54 +00:00
parent c4f00b4328
commit 0c858eaba1
2 changed files with 27 additions and 1 deletions

27
git-edit-readme.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
#
# git-edit-readme.sh
#
# Edit the README.md for an smeserver package and alter the bugzilla link
#
# $1 = package name
#
cd ~/GITFiles/smeserver
if [ -d "$1" ]; then
cd "$1"
git pull
else
git clone "https://src.koozali.org/smeserver/$1"
cd "$1"
fi
# Edit the README.md file
if [ -f "README.md" ]; then
sed -i '/Show list of outstanding bugs: \[here\]/c\Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?quicksearch='"$1"')' README.md
git status
git add --all
git commit -m "Update readme bugzilla link to show all outstanding bugs"
git push
else
echo "README.md not found in $1"
fi

@ -1 +0,0 @@
Subproject commit fb6a44f132b39eee812b9e47256212d4dbd5d1e5