27 lines
642 B
Bash
27 lines
642 B
Bash
|
#!/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
|