diff options
author | HyungGi Lee <hyunggi.lee@samsung.com> | 2016-04-28 15:58:18 +0900 |
---|---|---|
committer | HyungGi Lee <hyunggi.lee@samsung.com> | 2016-04-28 15:58:18 +0900 |
commit | 926f8df26ab85e63b1b7d4b9f609296cd7a0dbde (patch) | |
tree | 6673cc9b8daa2518c8995b6d246c4885b75c8c7f /scripts | |
parent | 553e014bb5a2ea5c7bc2e8aa6e55fa2cc2b2dd9f (diff) | |
download | meta-mobile-926f8df26ab85e63b1b7d4b9f609296cd7a0dbde.tar.gz meta-mobile-926f8df26ab85e63b1b7d4b9f609296cd7a0dbde.tar.bz2 meta-mobile-926f8df26ab85e63b1b7d4b9f609296cd7a0dbde.zip |
add script for generate license.htmlsubmit/tizen/20160428.075138accepted/tizen/mobile/20160428.082128
Change-Id: Iac5244afd197436560a5ef6d4868178c413f1203
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mobile-license.post | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/scripts/mobile-license.post b/scripts/mobile-license.post new file mode 100644 index 0000000..5f7103e --- /dev/null +++ b/scripts/mobile-license.post @@ -0,0 +1,50 @@ +#!/bin/sh +echo "############### mobile-license.post ################" + +LICENSE_DIR=/usr/share/license +LICENSE_FILE=/usr/share/license.html +MD5_TEMP_FILE=/usr/share/temp_license_md5 + +if [[ -f $LICENSE_FILE ]]; then + rm -f $LICENSE_FILE +fi + +LICENSE_LIST=`ls $LICENSE_DIR` + +if [[ -f $MD5_TEMP_FILE ]]; then + rm -f $MD5_TEMP_FILE +fi + +cd $LICENSE_DIR + +for INPUT in $LICENSE_LIST; do + if [[ -f $INPUT ]]; then + md5sum $INPUT >> $MD5_TEMP_FILE + fi +done + +MD5_LIST=`cat $MD5_TEMP_FILE|awk '{print $1}'|sort -u` + +echo "<html>" >> $LICENSE_FILE +echo "<head>" >> $LICENSE_FILE +echo "<meta name=\"viewport\" content=\"initial-scale=1.0\">" >> $LICENSE_FILE +echo "</head>" >> $LICENSE_FILE +echo "<body>" >> $LICENSE_FILE +echo "<xmp>" >> $LICENSE_FILE + +for INPUT in $MD5_LIST; do + PKG_LIST=`cat $MD5_TEMP_FILE|grep $INPUT|awk '{print $2}'` + PKG_NAME=`echo $PKG_LIST|awk '{print $1}'` + + echo "$PKG_LIST :" >> $LICENSE_FILE + cat $PKG_NAME >> $LICENSE_FILE + echo >> $LICENSE_FILE + echo >> $LICENSE_FILE + echo >> $LICENSE_FILE +done + +echo "</xmp>" >> $LICENSE_FILE +echo "</body>" >> $LICENSE_FILE +echo "</html>" >> $LICENSE_FILE + +rm -rf $LICENSE_DIR/* $MD5_TEMP_FILE |