浏览代码

Updating the social icon when a mesh peer goes online

Bob Mottram 7 年前
父节点
当前提交
1d929909ba
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8
    4
      src/freedombone-image-customise

+ 8
- 4
src/freedombone-image-customise 查看文件

966
         fi
966
         fi
967
     fi
967
     fi
968
 
968
 
969
+    add_social_icon=
969
     if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then
970
     if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then
971
+        add_social_icon=1
972
+    else
973
+        if grep -q "Offline" /home/$MY_USERNAME/Desktop/social.desktop; then
974
+            add_social_icon=1
975
+        fi
976
+    fi
977
+    if [ $add_social_icon ]; then
970
         echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop
978
         echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop
971
         echo 'Name=Social' >> /home/$MY_USERNAME/Desktop/social.desktop
979
         echo 'Name=Social' >> /home/$MY_USERNAME/Desktop/social.desktop
972
         echo 'Name[el]=Κοινωνικός' >> /home/$MY_USERNAME/Desktop/social.desktop
980
         echo 'Name[el]=Κοινωνικός' >> /home/$MY_USERNAME/Desktop/social.desktop
997
         echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/social.desktop
1005
         echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/social.desktop
998
         chmod +x /home/$MY_USERNAME/Desktop/social.desktop
1006
         chmod +x /home/$MY_USERNAME/Desktop/social.desktop
999
         chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/social.desktop
1007
         chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/social.desktop
1000
-    else
1001
-        if grep -q "Offline" /home/$MY_USERNAME/Desktop/social.desktop; then
1002
-            sed -i 's|Name=.*|Name=Social|g' /home/$MY_USERNAME/Desktop/social.desktop
1003
-        fi
1004
     fi
1008
     fi
1005
 
1009
 
1006
     #if [ ! -f /home/$MY_USERNAME/Desktop/audio.desktop ]; then
1010
     #if [ ! -f /home/$MY_USERNAME/Desktop/audio.desktop ]; then