diff --git a/create_linux_installers.sh b/create_linux_installers.sh index 909fdf3..3b27bc8 100755 --- a/create_linux_installers.sh +++ b/create_linux_installers.sh @@ -1,3 +1,4 @@ + #!/bin/bash VERSION=`git describe --long | sed "s/-.*//"` @@ -56,6 +57,12 @@ for rpmdir in $OBS_RPM_ARCHS ; do rpm2cpio $RPM_FILE | cpio -i --to-stdout ./usr/bin/SysTray-X > SysTray-X 2>/dev/null chmod 755 SysTray-X + rpm2cpio $RPM_FILE | cpio -i --to-stdout ./usr/share/doc/packages/systray-x/systray-x@Ximi1970.xpi > systray-x@Ximi1970.xpi 2>/dev/null + + if [ ! -f ../systray-x@Ximi1970.xpi ] ; then + cp -f systray-x@Ximi1970.xpi .. + fi + # # Get JSON # @@ -123,6 +130,8 @@ for debdir in $OBS_DEB_ARCHS ; do dpkg --fsys-tarfile $DEB_FILE | tar xOf - ./usr/bin/SysTray-X > SysTray-X chmod 755 SysTray-X + dpkg --fsys-tarfile $DEB_FILE | tar xOf - ./usr/lib/thunderbird-addons/extensions/systray-x@Ximi1970.xpi > systray-x@Ximi1970.xpi + # # Get JSON # diff --git a/create-win-installers.sh b/create_win_installers.sh similarity index 100% rename from create-win-installers.sh rename to create_win_installers.sh diff --git a/dist/install.sh b/dist/install.sh index bdbce5a..d24c30c 100755 --- a/dist/install.sh +++ b/dist/install.sh @@ -4,17 +4,23 @@ INSTALL_HOME=`echo ~` if [ "$1" == "-h" ] ; then echo - echo "Usage: $0 [abs-install-path]" + echo "Usage: $0 [abs-install-path [profiles-path] ]" echo echo " Default install path: $INSTALL_HOME/.mozilla/native-messaging-hosts" + echo " Default profiles: $INSTALL_HOME/.thunderbird" echo exit 0 fi if [ -n "$1" ] ; then DESTINATION="$1" + + if [ -n "$2" ] ; then + PROFILES="$2" + fi else DESTINATION="$INSTALL_HOME/.mozilla/native-messaging-hosts" + PROFILES="$INSTALL_HOME/.thunderbird" fi # @@ -24,6 +30,9 @@ echo echo "Installing SysTray-X companion app to:" echo "$DESTINATION" echo +echo "Installing SysTray-X addon into all profiles listed in:" +echo "$PROFILES/profiles.ini" +echo read -n 1 -s -r -p "Press any key to continue, Ctrl-C to cancel" echo @@ -50,11 +59,21 @@ INSTALL_HOME=`echo ~` sed -i "s?SYSTRAY_X_PATH?${DESTINATION}/SysTray-X?" ${DESTINATION}/SysTray_X.json.template mv -f ${DESTINATION}/SysTray_X.json.template ${DESTINATION}/SysTray_X.json +# +# Installing the add-on +# +echo "Installing SysTray-X addon..." + +for i in `grep "Path=" $PROFILES/profiles.ini | sed -e "s/Path=//"` ; do + mkdir -p $PROFILES/$i/extensions + cp -f systray-x@Ximi1970.xpi $PROFILES/$i/extensions +done + # # Done # echo "" -echo "Companion app installation complete." +echo "Addon and companion app installation complete." echo "App en JSON config have been installed in: $DESTINATION" echo "" echo "Do not forget to install the Thunderbird SysTray-X Add-on" diff --git a/upload-assets.sh b/upload-assets.sh old mode 100644 new mode 100755