r478 - trunk/meta/xdg-utils
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jan 25 23:28:03 EST 2008
Author: icculus
Date: 2008-01-25 23:28:02 -0500 (Fri, 25 Jan 2008)
New Revision: 478
Modified:
trunk/meta/xdg-utils/xdg-open
Log:
Trimmed more bytes from script.
Modified: trunk/meta/xdg-utils/xdg-open
===================================================================
--- trunk/meta/xdg-utils/xdg-open 2008-01-26 00:21:46 UTC (rev 477)
+++ trunk/meta/xdg-utils/xdg-open 2008-01-26 04:28:02 UTC (rev 478)
@@ -1,5 +1,4 @@
#!/bin/sh
-# (trimmed by ryan to reduce size.)
# Copyright 2006, Kevin Krammer <kevin.krammer at gmx.at>
# Copyright 2006, Jeremy White <jwhite at codeweavers.com>
#
@@ -35,48 +34,21 @@
exit_failure_syntax()
{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- echo "Try 'xdg-open --help' for more information." >&2
- else
- usage
- echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info."
- fi
-
exit 1
}
exit_failure_operation_impossible()
{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
exit 3
}
exit_failure_operation_failed()
{
- if [ $# -gt 0 ]; then
- echo "xdg-open: $@" >&2
- fi
-
exit 4
}
check_common_commands()
{
- while [ $# -gt 0 ] ; do
- parm="$1"
- shift
-
- case "$parm" in
- --version)
- echo "xdg-open 1.0.1"
- exit_success
- ;;
- esac
- done
}
check_common_commands "$@"
@@ -159,7 +131,7 @@
fi
done
- exit_failure_operation_impossible "no method available for opening '$1'"
+ exit_failure_operation_impossible
}
[ x"$1" != x"" ] || exit_failure_syntax
@@ -171,12 +143,12 @@
case "$parm" in
-*)
- exit_failure_syntax "unexpected option '$parm'"
+ exit_failure_syntax
;;
*)
if [ -n "$url" ] ; then
- exit_failure_syntax "unexpected argument '$parm'"
+ exit_failure_syntax
fi
url="$parm"
;;
@@ -184,7 +156,7 @@
done
if [ -z "${url}" ] ; then
- exit_failure_syntax "file or URL argument missing"
+ exit_failure_syntax
fi
detectDE
@@ -215,6 +187,6 @@
;;
*)
- exit_failure_operation_impossible "no method available for opening '$url'"
+ exit_failure_operation_impossible
;;
esac
More information about the mojosetup-commits
mailing list