diff options
author | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2014-04-11 18:00:18 +0200 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2014-04-11 18:00:18 +0200 |
commit | 5667c4d225321ac5e4590ca2be98262dc9afa919 (patch) | |
tree | fe7105f109a5db98b388bd8e7876db51b303e4b8 | |
parent | 622b49fcc5e2c1bd0f34e30f93df0f325b89abe3 (diff) | |
download | wrt-widgets-5667c4d225321ac5e4590ca2be98262dc9afa919.tar.gz wrt-widgets-5667c4d225321ac5e4590ca2be98262dc9afa919.tar.bz2 wrt-widgets-5667c4d225321ac5e4590ca2be98262dc9afa919.zip |
spread widgets install on multiple users
Change-Id: I9a79dcf610247c25370385306d041f3c8d7708ca
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-rw-r--r-- | install.conf | 5 | ||||
-rwxr-xr-x | install_widgets.sh | 13 | ||||
-rw-r--r-- | packaging/wrt-widgets.spec | 3 |
3 files changed, 17 insertions, 4 deletions
diff --git a/install.conf b/install.conf new file mode 100644 index 0000000..a3d51dc --- /dev/null +++ b/install.conf @@ -0,0 +1,5 @@ +alice:annex.wgt +bob:bubblewrap.wgt go.wgt +carol: +app:mancala.wgt +guest:BluetoothChat.wgt diff --git a/install_widgets.sh b/install_widgets.sh index 42beb02..d1f56a0 100755 --- a/install_widgets.sh +++ b/install_widgets.sh @@ -15,16 +15,23 @@ if [ -z "$(ls $wgtdir/*.wgt 2> /dev/null)" ]; then exit 1 fi -for wgt in $wgtdir/*.wgt +for wgt in $(grep "^$USER" $wgtdir/install.conf | cut -f2 -d':'); do do echo "installing $wgt" if [ -x /usr/bin/wrt-installer ]; then - wrt-installer -i $wgt + wrt-installer -i $wgtdir/$wgt else - xwalkctl -i $wgt + xwalkctl -i $wgtdir/$wgt fi done +# setup desktop icons for xwalk +if [ ! -x /usr/bin/wrt-installer ]; then + for id in $(sqlite3 ~/.config/xwalk-service/applications.db 'select id from applications'); do + ln -sf /opt/share/applications/xwalk-service.$id.*.desktop ~/.applications/desktop/ + done +fi + [[ "$(id -u)" == "0" ]] && chmod -R a+rw ${TZ_SYS_DB}/ if [ -x /usr/bin/wrt-launcher ]; then diff --git a/packaging/wrt-widgets.spec b/packaging/wrt-widgets.spec index e8f6b8a..47353f0 100644 --- a/packaging/wrt-widgets.spec +++ b/packaging/wrt-widgets.spec @@ -26,10 +26,11 @@ cp prepare_widgets.sh %{buildroot}/%{_bindir} mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/widget_demo cp -r *.wgt %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/ +cp install.conf %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/ %post %files -%{TZ_SYS_SHARE}/widget_demo/*.wgt +%{TZ_SYS_SHARE}/widget_demo/* %attr(755,root,root) %{_bindir}/install_widgets.sh %attr(755,root,root) %{_bindir}/prepare_widgets.sh |