Parcourir la source

Preparing for cryptpad icon

Bob Mottram il y a 7 ans
Parent
révision
8f13c6e193
2 fichiers modifiés avec 20 ajouts et 0 suppressions
  1. 3
    0
      src/freedombone-app-cryptpad
  2. 17
    0
      src/freedombone-image-customise

+ 3
- 0
src/freedombone-app-cryptpad Voir le fichier

@@ -226,6 +226,9 @@ function mesh_install_cryptpad {
226 226
     if [ -d $rootdir$CRYPTPAD_DIR ]; then
227 227
         rm -rf $rootdir$CRYPTPAD_DIR
228 228
     fi
229
+    if [ -f $rootdir/root/$PROJECT_NAME/img/icon_cryptpad.png ]; then
230
+        cp $rootdir/root/$PROJECT_NAME/img/icon_cryptpad.png $rootdir/etc/cryptpad/icon_cryptpad.png
231
+    fi
229 232
 
230 233
     git_clone $CRYPTPAD_REPO $rootdir$CRYPTPAD_DIR
231 234
 

+ 17
- 0
src/freedombone-image-customise Voir le fichier

@@ -928,6 +928,23 @@ if [ \$no_of_users -gt 0 ]; then
928 928
     chmod +x /home/$MY_USERNAME/Desktop/Users.desktop
929 929
     chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/Users.desktop
930 930
 
931
+    if [ ! -f /home/$MY_USERNAME/Desktop/cryptpad.desktop ]; then
932
+        echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/cryptpad.desktop
933
+        echo 'Name=CryptPad' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
934
+        echo 'Type=Application' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
935
+        echo 'Comment=Realtime collaborative editing of documents' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
936
+        echo "Exec=$BROWSER http://127.0.0.1" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
937
+        echo "Icon=/etc/cryptpad/icon_cryptpad.png" >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
938
+        echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
939
+        echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/cryptpad.desktop
940
+        chmod +x /home/$MY_USERNAME/Desktop/cryptpad.desktop
941
+        chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/cryptpad.desktop
942
+    else
943
+        if grep -q "Offline" /home/$MY_USERNAME/Desktop/cryptpad.desktop; then
944
+            sed -i 's|Name=.*|Name=CryptPad|g' /home/$MY_USERNAME/Desktop/cryptpad.desktop
945
+        fi
946
+    fi
947
+
931 948
     if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then
932 949
         echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop
933 950
         echo 'Name=Social' >> /home/$MY_USERNAME/Desktop/social.desktop