summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste DURAND <baptiste.durand@eurogiciel.fr>2013-06-25 13:51:36 +0200
committerBaptiste DURAND <baptiste.durand@eurogiciel.fr>2013-06-25 13:51:36 +0200
commit12cf9b787edb1ee950cf3bfb1b149bedbef9fdb1 (patch)
tree3500b031fcba70a836757c203783e11e295f9842
parent075c297f565af168c07c19d42a45c1eaeba582b7 (diff)
downloadwrt-widgets-12cf9b787edb1ee950cf3bfb1b149bedbef9fdb1.tar.gz
wrt-widgets-12cf9b787edb1ee950cf3bfb1b149bedbef9fdb1.tar.bz2
wrt-widgets-12cf9b787edb1ee950cf3bfb1b149bedbef9fdb1.zip
Enable the WA for icon creation
-rwxr-xr-xinstall_widgets.sh48
1 files changed, 24 insertions, 24 deletions
diff --git a/install_widgets.sh b/install_widgets.sh
index fd4617a..cff8cf1 100755
--- a/install_widgets.sh
+++ b/install_widgets.sh
@@ -25,30 +25,30 @@ chmod -R a+rw /opt/dbspace/
wrt-launcher --list |
awk 'NR>2{print $2, $5, $6}' |
-#while read name packid appid
-#do
-# bin=$repo/$packid/bin/$appid
-# for x in $repo/$packid/res/wgt/*[iI][cC][oO][nN]*; do
-# if [[ -f $x ]]; then
-# res=$(file -b $x|cut -d , -f 2|tr -d ' '|egrep '[0-9]+x[0-9]+')
-# if [[ -n "$res" ]]; then
-# diric=/usr/share/icons/hicolor/$res/apps
-# [[ -d $diric ]] || mkdir -p $diric
-# cp $x $diric/$name.png
-# fi
-# fi
-# done
-# desk=/usr/share/applications/$name.desktop
-# cat << EOC > $desk
-#[Desktop Entry]
-#Type=Application
-#Name=$name
-#Exec=$bin
-#Icon=$name
-#Terminal=false
-#Categories=WRT;Game
-#EOC
-#done
+while read name packid appid
+do
+ bin=$repo/$packid/bin/$appid
+ for x in $repo/$packid/res/wgt/*[iI][cC][oO][nN]*; do
+ if [[ -f $x ]]; then
+ res=$(file -b $x|cut -d , -f 2|tr -d ' '|egrep '[0-9]+x[0-9]+')
+ if [[ -n "$res" ]]; then
+ diric=/usr/share/icons/hicolor/$res/apps
+ [[ -d $diric ]] || mkdir -p $diric
+ cp $x $diric/$name.png
+ fi
+ fi
+ done
+ desk=/usr/share/applications/$name.desktop
+ cat << EOC > $desk
+[Desktop Entry]
+Type=Application
+Name=$name
+Exec=$bin
+Icon=$name
+Terminal=false
+Categories=WRT;Game
+EOC
+done
update-desktop-database
xdg-icon-resource forceupdate