tazbug rev 97

Add script to extract DESC from bug.conf and create a desc.txt (using text file is way better than a VAR)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Feb 09 18:35:56 2017 +0100 (2017-02-09)
parents 2228e0785489
children 60234e42d5c4
files convert-desc.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/convert-desc.sh	Thu Feb 09 18:35:56 2017 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# Extract bug description from a bug.conf file to create a desc.txt file
     1.7 +#
     1.8 +. /lib/libtaz.sh
     1.9 +check_root
    1.10 +path="$1"
    1.11 +
    1.12 +if [ ! "${path}" ]; then
    1.13 +	echo "Usage: $0 path/to/bug" && exit 0
    1.14 +fi
    1.15 +
    1.16 +cd ${path}
    1.17 +
    1.18 +for bug in *
    1.19 +do
    1.20 +	 . ./${bug}/bug.conf
    1.21 +	 echo  -n "Converting bug: ${bug} "
    1.22 +	 echo "${DESC}" > ${bug}/desc.txt
    1.23 +	 chown www.www ${bug}/desc.txt
    1.24 +	 status
    1.25 +done
    1.26 +
    1.27 +exit 0