renaming and setting execution rights
authorjbollo <jose.bollo@eurogiciel.fr>
Wed, 17 Apr 2013 13:47:28 +0000 (15:47 +0200)
committerjbollo <jose.bollo@eurogiciel.fr>
Wed, 17 Apr 2013 13:47:28 +0000 (15:47 +0200)
install_desktop.sh [new file with mode: 0755]
install_widgets.sh [changed mode: 0644->0755]
load_widget.sh [deleted file]

diff --git a/install_desktop.sh b/install_desktop.sh
new file mode 100755 (executable)
index 0000000..9693075
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh
+
+repo=/opt/usr/apps/
+chmod -R a+rw /opt/dbspace/
+
+dbwdgt() {
+cat << EOC
+33CFo0eFJe  Annex
+yKrWwxz1KX  Mancala
+ewqPdCunAO  BubbleWrap
+SM31mV8fq9  Go
+EOC
+}
+
+dbwdgt |
+while read id name
+do
+    bin=$(ls /opt/usr/apps/$id/bin/$id.*)
+    for x in /opt/usr/apps/$id/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
+
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/load_widget.sh b/load_widget.sh
deleted file mode 100644 (file)
index c55299f..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-
-repo=/opt/usr/apps/
-chmod -R a+rw /opt/dbspace/
-
-dbwdgt() {
-cat << EOC
-33CFo0eFJe  Annex
-yKrWwxz1KX  Mancala
-ewqPdCunAO  BubbleWrap
-SM31mV8fq9  Go
-EOC
-}
-
-dbwdgt |
-while read id name
-do
-    bin=$(ls /opt/usr/apps/$id/bin/$id.*)
-    for x in /opt/usr/apps/$id/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
-
-xdg-icon-resource forceupdate
-