tazbug diff mv-open-closed.sh @ rev 135
Store bug in bug/open and bug/closed (not yet ready for tank still some plugins adjust)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 21 21:11:27 2017 +0100 (2017-02-21) |
parents | |
children | a7b3022941ad |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mv-open-closed.sh Tue Feb 21 21:11:27 2017 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# From Tazbug 2.1 bugs are stored into $bugdir/open or $bugdir/closed 1.7 +# This script will move all bugs to the correct directory 1.8 +# 1.9 +. /lib/libtaz.sh 1.10 +check_root 1.11 +path="$1" 1.12 + 1.13 +if [ ! "${path}" ]; then 1.14 + echo "Usage: $0 path/to/bug" && exit 0 1.15 +fi 1.16 + 1.17 +cd ${path} 1.18 +mkdir -p open closed 1.19 + 1.20 +for bug in * 1.21 +do 1.22 + if [ -f "${bug}/bug.conf" ]; then 1.23 + . ./${bug}/bug.conf 1.24 + echo -n "Mouving bug: ${bug} $STATUS" 1.25 + if [ "$STATUS" == "OPEN" ]; then 1.26 + mv ${bug} open/ && status 1.27 + else 1.28 + mv ${bug} closed/ && status 1.29 + fi 1.30 + unset DESC BUG STATUS PRIORITY CREATOR DATE PKGS 1.31 + 1.32 + fi 1.33 + chown -R www.www * 1.34 +done 1.35 + 1.36 +exit 0