729a181ea9
split the deb package. See http://lists.opensuse.org/opensuse-factory/2012-06/msg00963.html for context OBS-URL: https://build.opensuse.org/request/show/127340 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=1
33 lines
616 B
Bash
33 lines
616 B
Bash
#!/bin/sh
|
|
|
|
ret="$?"
|
|
|
|
if [ -n "$VISUAL" ]; then
|
|
${VISUAL} "$@"
|
|
ret="$?"
|
|
if [ "$ret" -ne 126 ] && [ "$ret" -ne 127 ]; then
|
|
exit "$ret"
|
|
fi
|
|
fi
|
|
|
|
${EDITOR:-editor} "$@"
|
|
ret="$?"
|
|
if [ "$ret" -eq 126 ] || [ "$ret" -eq 127 ]; then
|
|
nano "$@"
|
|
ret="$?"
|
|
if [ "$ret" -eq 126 ] || [ "$ret" -eq 127 ]; then
|
|
nano-tiny "$@"
|
|
ret="$?"
|
|
if [ "$ret" -eq 126 ] || [ "$ret" -eq 127 ]; then
|
|
vi "$@"
|
|
ret="$?"
|
|
if [ "$ret" -eq 126 ] || [ "$ret" -eq 127 ]; then
|
|
echo "Couldn't find an editor!" 1>&2
|
|
echo "Set the \$EDITOR environment variable to your desired editor." 1>&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
exit "$ret"
|