Skip to content

Commit

Permalink
Added:
Browse files Browse the repository at this point in the history
- Ubuntu 18.04 workaround
- using cat to write to files instead of echo
  • Loading branch information
mriza committed Jun 4, 2018
1 parent 5ab1d89 commit db575d5
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions xmind-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ else
fi

echo "Creating laucher..."
echo "" > /usr/share/applications/xmind8.desktop
echo "[Desktop Entry]" >> /usr/share/applications/xmind8.desktop
echo "Comment=Create and share mind maps." >> /usr/share/applications/xmind8.desktop
echo "Exec=$BIN_DIR/XMind %F" >> /usr/share/applications/xmind8.desktop
echo "Name=XMind" >> /usr/share/applications/xmind8.desktop
echo "Terminal=false" >> /usr/share/applications/xmind8.desktop
echo "Type=Application" >> /usr/share/applications/xmind8.desktop
echo "Categories=Office;" >> /usr/share/applications/xmind8.desktop
echo "Icon=xmind" >> /usr/share/applications/xmind8.desktop
cat << EOF | tee /usr/share/applications/xmind8.desktop
[Desktop Entry]
Comment=Create and share mind maps.
Exec=$BIN_DIR/XMind %F
Name=XMind
Terminal=false
Type=Application
Categories=Office;
Icon=xmind
EOF

if [ $? != 0 ]
then
status_flag=1
Expand All @@ -105,12 +107,23 @@ echo "Post installation configurations..."
sed -i "s/\.\.\/workspace/@user\.home\/workspace/g" "$BIN_DIR/XMind.ini"
sed -i "s/\.\/configuration/@user\.home\/\.configuration/g" "$BIN_DIR/XMind.ini"
sed -i "s/^\.\./\/opt\/xmind/g" "$BIN_DIR/XMind.ini"

cat EOF << | tee /opt/xmind/XMind_amd64/XMind.ini
-vmargs
--add-modules=java.se.ee
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
EOF
echo "...Updating MIME database"
cp xmind.xml /usr/share/mime/packages/
update-mime-database /usr/share/mime
echo "...Adding icon"
cp xmind.svg /usr/share/icons/hicolor/scalable/mimetypes
gtk-update-icon-cache /usr/share/icons/hicolor/ -f
if [ $? != 0 ]
then
status_flag=1
Expand Down

1 comment on commit db575d5

@mriza
Copy link
Owner Author

@mriza mriza commented on db575d5 Jun 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Juba19 for suggestions

Please sign in to comment.