slitaz-pizza diff web/pkgs.cgi @ rev 105

Fix i18n
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jan 25 14:21:08 2014 +0100 (2014-01-25)
parents 3cf2fad02419
children 57a95ac66802
line diff
     1.1 --- a/web/pkgs.cgi	Thu Aug 02 11:31:24 2012 +0200
     1.2 +++ b/web/pkgs.cgi	Sat Jan 25 14:21:08 2014 +0100
     1.3 @@ -38,18 +38,18 @@
     1.4  	done
     1.5  }
     1.6  
     1.7 -# Gen an empty receipt for new flavor.
     1.8 -empty_receipt() {
     1.9 +# Gen an receipt for new flavor.
    1.10 +gen_receipt() {
    1.11  	cat > $tmpdir/slitaz-$id/receipt << EOT
    1.12  # SliTaz flavor receipt.
    1.13  
    1.14 -FLAVOR=""
    1.15 -SHORT_DESC=""
    1.16 +FLAVOR="slitaz-$flavor"
    1.17 +SHORT_DESC="$desc"
    1.18  VERSION="$(date "+%Y%m%d")"
    1.19 -MAINTAINER=""
    1.20 +MAINTAINER="$mail"
    1.21  
    1.22 -ID=""
    1.23 -SKEL=""
    1.24 +ID="$id"
    1.25 +SKEL="$skel"
    1.26  
    1.27  EOT
    1.28  }
    1.29 @@ -113,13 +113,7 @@
    1.30  		cp -f $hgflavors/$skel/packages.list $list
    1.31  		[ -d "$hgflavors/$skel/rootfs" ] && \
    1.32  			cp -a $hgflavors/$skel/rootfs $tmpdir/slitaz-$id
    1.33 -		empty_receipt
    1.34 -		sed -i \
    1.35 -			-e s"/FLAVOR=.*/FLAVOR=\"slitaz-$flavor\"/" \
    1.36 -			-e s"/MAINTAINER=.*/MAINTAINER=\"$mail\"/" \
    1.37 -			-e s"/SKEL=.*/SKEL=\"$skel\"/" \
    1.38 -			-e s"/SHORT_DESC=.*/SHORT_DESC=\"$(echo $desc | sed 's/\([&\/]\)/\\\1/g')\"/" \
    1.39 -			-e s"/ID=.*/ID=\"$id\"/" $tmpdir/slitaz-$id/receipt 
    1.40 +		gen_receipt
    1.41  		echo "Receipt created : $(date '+%Y-%m-%d %H:%M')" > $log ;;
    1.42  esac
    1.43