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

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 26 08:28:10 2019 +0100 (7 months ago)
parents a7b3022941ad
children
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