tazbug view mv-open-closed.sh @ rev 137

Update all plugins to use new storage paths
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 14:59:49 2017 +0100 (2017-02-22)
parents b5f62d54152e
children 8fcbcf75a882
line source
1 #!/bin/sh
2 #
3 # From Tazbug 2.1 bugs are stored in $bugdir/open or $bugdir/closed
4 # This script will move all bugs to the correct directory
5 #
6 . /lib/libtaz.sh
7 check_root
8 path="$1"
10 if [ ! "${path}" ]; then
11 echo "Usage: $0 path/to/bug" && exit 0
12 fi
14 cd ${path}
15 mkdir -p open closed
17 for bug in *
18 do
19 if [ -f "${bug}/bug.conf" ]; then
20 . ./${bug}/bug.conf
21 echo -n "Moving bug: ${bug} $STATUS"
22 if [ "$STATUS" == "OPEN" ]; then
23 mv ${bug} open/ && status
24 else
25 mv ${bug} closed/ && status
26 fi
27 unset DESC BUG STATUS PRIORITY CREATOR DATE PKGS
29 fi
30 chown -R www.www *
31 done
33 exit 0