From 8f13c6e193301e57603fb1d2597882c61ba6a0f0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 23 Oct 2017 20:12:10 +0100 Subject: [PATCH] Preparing for cryptpad icon --- src/freedombone-app-cryptpad | 3 +++ src/freedombone-image-customise | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/freedombone-app-cryptpad b/src/freedombone-app-cryptpad index 83b7d257..9f8c30b8 100755 --- a/src/freedombone-app-cryptpad +++ b/src/freedombone-app-cryptpad @@ -226,6 +226,9 @@ function mesh_install_cryptpad { if [ -d $rootdir$CRYPTPAD_DIR ]; then rm -rf $rootdir$CRYPTPAD_DIR fi + if [ -f $rootdir/root/$PROJECT_NAME/img/icon_cryptpad.png ]; then + cp $rootdir/root/$PROJECT_NAME/img/icon_cryptpad.png $rootdir/etc/cryptpad/icon_cryptpad.png + fi git_clone $CRYPTPAD_REPO $rootdir$CRYPTPAD_DIR diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index ce92d438..70c1ad8b 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -928,6 +928,23 @@ if [ \$no_of_users -gt 0 ]; then chmod +x /home/$MY_USERNAME/Desktop/Users.desktop chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/Users.desktop + if [ ! -f /home/$MY_USERNAME/Desktop/cryptpad.desktop ]; then + echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo 'Name=CryptPad' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo 'Comment=Realtime collaborative editing of documents' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo "Exec=$BROWSER http://127.0.0.1" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo "Icon=/etc/cryptpad/icon_cryptpad.png" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop + chmod +x /home/$MY_USERNAME/Desktop/cryptpad.desktop + chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/cryptpad.desktop + else + if grep -q "Offline" /home/$MY_USERNAME/Desktop/cryptpad.desktop; then + sed -i 's|Name=.*|Name=CryptPad|g' /home/$MY_USERNAME/Desktop/cryptpad.desktop + fi + fi + if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop echo 'Name=Social' >> /home/$MY_USERNAME/Desktop/social.desktop