tazbug annotate mv-open-closed.sh @ rev 157
pot files updated
author | Hans-G?nter Theisgen |
---|---|
date | Thu Jan 10 16:40:34 2019 +0100 (2019-01-10) |
parents | b5f62d54152e |
children | 8fcbcf75a882 |
rev | line source |
---|---|
pankso@135 | 1 #!/bin/sh |
pankso@135 | 2 # |
paul@136 | 3 # From Tazbug 2.1 bugs are stored in $bugdir/open or $bugdir/closed |
pankso@135 | 4 # This script will move all bugs to the correct directory |
pankso@135 | 5 # |
pankso@135 | 6 . /lib/libtaz.sh |
pankso@135 | 7 check_root |
pankso@135 | 8 path="$1" |
pankso@135 | 9 |
pankso@135 | 10 if [ ! "${path}" ]; then |
pankso@135 | 11 echo "Usage: $0 path/to/bug" && exit 0 |
pankso@135 | 12 fi |
pankso@135 | 13 |
pankso@135 | 14 cd ${path} |
pankso@135 | 15 mkdir -p open closed |
pankso@135 | 16 |
pankso@135 | 17 for bug in * |
pankso@135 | 18 do |
pankso@135 | 19 if [ -f "${bug}/bug.conf" ]; then |
pankso@135 | 20 . ./${bug}/bug.conf |
paul@136 | 21 echo -n "Moving bug: ${bug} $STATUS" |
pankso@135 | 22 if [ "$STATUS" == "OPEN" ]; then |
pankso@135 | 23 mv ${bug} open/ && status |
pankso@135 | 24 else |
pankso@135 | 25 mv ${bug} closed/ && status |
pankso@135 | 26 fi |
pankso@135 | 27 unset DESC BUG STATUS PRIORITY CREATOR DATE PKGS |
pankso@135 | 28 |
pankso@135 | 29 fi |
pankso@135 | 30 chown -R www.www * |
pankso@135 | 31 done |
pankso@135 | 32 |
pankso@135 | 33 exit 0 |