Fixed some places where whitespace was not handled correctly.
Do not use `cmd`s within cat <<EOF since bash1 sometimes gets confused by it.
This commit is contained in:
parent
5355a7870b
commit
9c6af0a490
|
@ -42,12 +42,12 @@ do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(--desktop) mode="desktop"; shift 1 ;;
|
(--desktop) mode="desktop"; shift 1 ;;
|
||||||
(--menu) mode="menu"; shift 1 ;;
|
(--menu) mode="menu"; shift 1 ;;
|
||||||
(--path) path=$2; shift 2 ;;
|
(--path) path="$2"; shift 2 ;;
|
||||||
(--link) link=$2; shift 2 ;;
|
(--link) link="$2"; shift 2 ;;
|
||||||
(--args) args=$2; shift 2 ;;
|
(--args) args="$2"; shift 2 ;;
|
||||||
(--icon) icon=$2; shift 2 ;;
|
(--icon) icon="$2"; shift 2 ;;
|
||||||
(--descr) descr=$2; shift 2 ;;
|
(--descr) descr="$2"; shift 2 ;;
|
||||||
(--workdir) workdir=$2; shift 2 ;;
|
(--workdir) workdir="$2"; shift 2 ;;
|
||||||
(*) usage ;;
|
(*) usage ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -64,10 +64,11 @@ fi
|
||||||
|
|
||||||
kde_entry()
|
kde_entry()
|
||||||
{
|
{
|
||||||
|
xname=`basename "$link"`
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
# KDE Config File
|
# KDE Config File
|
||||||
[KDE Desktop Entry]
|
[KDE Desktop Entry]
|
||||||
Name=`basename "$link"`
|
Name=$xname
|
||||||
Exec=wine "$path" $args
|
Exec=wine "$path" $args
|
||||||
Type=Application
|
Type=Application
|
||||||
Comment=$descr
|
Comment=$descr
|
||||||
|
@ -78,9 +79,10 @@ EOF
|
||||||
|
|
||||||
gnome_entry()
|
gnome_entry()
|
||||||
{
|
{
|
||||||
|
xname=`basename "$link"`
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=`basename "$link"`
|
Name=$xname
|
||||||
Exec=wine "$path" $args
|
Exec=wine "$path" $args
|
||||||
Type=Application
|
Type=Application
|
||||||
Comment=$descr
|
Comment=$descr
|
||||||
|
@ -100,7 +102,7 @@ mdk_entry()
|
||||||
# copy the icon file to a specified dir and set xpmicon to the resulting path
|
# copy the icon file to a specified dir and set xpmicon to the resulting path
|
||||||
copy_icon()
|
copy_icon()
|
||||||
{
|
{
|
||||||
dir=$1
|
dir="$1"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
mkdir -p "$dir/""`dirname "$link"`" || true
|
mkdir -p "$dir/""`dirname "$link"`" || true
|
||||||
if [ -f "$icon" ]
|
if [ -f "$icon" ]
|
||||||
|
@ -121,7 +123,7 @@ then
|
||||||
dir="$HOME/.menu/icons"
|
dir="$HOME/.menu/icons"
|
||||||
if [ -f "$icon" ]
|
if [ -f "$icon" ]
|
||||||
then
|
then
|
||||||
mkdir -p $dir
|
mkdir -p "$dir"
|
||||||
cp "$icon" "$dir/$iconname"
|
cp "$icon" "$dir/$iconname"
|
||||||
xpmicon="$dir/$iconname"
|
xpmicon="$dir/$iconname"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue