Skip to content

Commit 195fba9

Browse files
authored
Remove cosmetic error messages, thanks @TravisEz13
[ci skip]
1 parent c91c0d3 commit 195fba9

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

desktopintegration

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# into the host system without special help from the host system.
55
# If you want to use it, then place this in usr/bin/$APPNAME.wrapper
66
# and set it as the Exec= line of the .desktop file in the AppImage.
7-
#
7+
#
88
# For example, to install the appropriate icons for Scribus,
99
# put them into the AppDir at the following locations:
10-
#
10+
#
1111
# ./usr/share/icons/default/128x128/apps/scribus.png
1212
# ./usr/share/icons/default/128x128/mimetypes/application-vnd.scribus.png
1313
#
@@ -19,7 +19,7 @@
1919
# below in usr/bin/scribus.wrapper and make it executable.
2020
# When you run AppRun, then AppRun runs the wrapper script below
2121
# which in turn will run the main application.
22-
#
22+
#
2323
# TODO:
2424
# Handle multiple versions of the same AppImage?
2525
# Handle removed AppImages? Currently we are just setting TryExec=
@@ -33,7 +33,7 @@ set -e
3333
if [ ! -z "$DEBUG" ] ; then
3434
env
3535
set -x
36-
fi
36+
fi
3737

3838
THIS="$0"
3939
args=("$@") # http://stackoverflow.com/questions/3190818/
@@ -49,7 +49,7 @@ find-up () {
4949
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
5050
path=${path%/*}
5151
done
52-
echo "$path"
52+
# echo "$path"
5353
}
5454

5555
if [ -z $APPDIR ] ; then
@@ -60,11 +60,11 @@ if [ -z $APPDIR ] ; then
6060
APPDIR=$(find-up "AppRun")
6161
fi
6262

63-
echo "$APPDIR"
63+
# echo "$APPDIR"
6464

6565
FILENAME="$(readlink -f "${THIS}")"
6666

67-
echo "$FILENAME"
67+
# echo "$FILENAME"
6868

6969
if [[ "$FILENAME" != *.wrapper ]] ; then
7070
echo "${THIS} is not named correctly. It should be named \$Exec.wrapper"
@@ -111,7 +111,7 @@ yesno()
111111
TITLE=$1
112112
TEXT=$2
113113
if [ -x /usr/bin/zenity ] ; then
114-
LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" || exit 0
114+
LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" 2>/dev/null || exit 0
115115
elif [ -x /usr/bin/kdialog ] ; then
116116
LD_LIBRARY_PATH="" kdialog --caption "Disk auswerfen?" --title "$TITLE" -yesno "$TEXT" || exit 0
117117
elif [ -x /usr/bin/Xdialog ] ; then
@@ -160,12 +160,12 @@ DIRNAME=$(dirname $FILENAME)
160160
check_dep desktop-file-validate
161161
check_dep update-desktop-database
162162
check_dep desktop-file-install
163-
check_dep xdg-icon-resource
164-
check_dep xdg-mime
163+
check_dep xdg-icon-resource
164+
check_dep xdg-mime
165165
check_dep xdg-desktop-menu
166166

167167
DESKTOPFILE=$(find "$APPDIR" -maxdepth 1 -name "*.desktop" | head -n 1)
168-
echo "$DESKTOPFILE"
168+
# echo "$DESKTOPFILE"
169169
DESKTOPFILE_NAME=$(basename "${DESKTOPFILE}")
170170

171171
if [ ! -f "$DESKTOPFILE" ] ; then
@@ -243,20 +243,20 @@ if [ -z "$SKIP" ] ; then
243243
--dir "$DESTINATION_DIR_DESKTOP"
244244
chmod a+x "$DESTINATION_DIR_DESKTOP/"*
245245
RESOURCE_NAME=$(echo "$VENDORPREFIX-$DESKTOPFILE_NAME" | sed -e 's/.desktop//g')
246-
echo $RESOURCE_NAME
246+
# echo $RESOURCE_NAME
247247

248248
# Install the icon files for the application; TODO: scalable
249-
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/apps/${APP}.png" || true)
249+
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/apps/${APP}.png" 2>/dev/null || true)
250250
for ICON in $ICONS ; do
251251
ICON_SIZE=$(echo "${ICON}" | rev | cut -d "/" -f 3 | rev | cut -d "x" -f 1)
252252
xdg-icon-resource install --context apps --size ${ICON_SIZE} "${ICON}" "${RESOURCE_NAME}"
253253
done
254254

255255
# Install mime type
256-
find "${APPDIR}/usr/share/mime/" -type f -name *xml -exec xdg-mime install $SYSTEM_WIDE --novendor {} \; || true
256+
find "${APPDIR}/usr/share/mime/" -type f -name *xml -exec xdg-mime install $SYSTEM_WIDE --novendor {} \; 2>/dev/null || true
257257

258258
# Install the icon files for the mime type; TODO: scalable
259-
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/mimetypes/*.png" || true)
259+
ICONS=$(find "${APPDIR}/usr/share/icons/" -wholename "*/mimetypes/*.png" 2>/dev/null || true)
260260
for ICON in $ICONS ; do
261261
ICON_SIZE=$(echo "${ICON}" | rev | cut -d "/" -f 3 | rev | cut -d "x" -f 1)
262262
xdg-icon-resource install --context mimetypes --size ${ICON_SIZE} "${ICON}" $(basename $ICON | sed -e 's/.png//g')

0 commit comments

Comments
 (0)