Commit 9c6af0a4 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Fixed some places where whitespace was not handled correctly.

Do not use `cmd`s within cat <<EOF since bash1 sometimes gets confused by it.
parent 5355a787
......@@ -42,12 +42,12 @@ do
case "$1" in
(--desktop) mode="desktop"; shift 1 ;;
(--menu) mode="menu"; shift 1 ;;
(--path) path=$2; shift 2 ;;
(--link) link=$2; shift 2 ;;
(--args) args=$2; shift 2 ;;
(--icon) icon=$2; shift 2 ;;
(--descr) descr=$2; shift 2 ;;
(--workdir) workdir=$2; shift 2 ;;
(--path) path="$2"; shift 2 ;;
(--link) link="$2"; shift 2 ;;
(--args) args="$2"; shift 2 ;;
(--icon) icon="$2"; shift 2 ;;
(--descr) descr="$2"; shift 2 ;;
(--workdir) workdir="$2"; shift 2 ;;
(*) usage ;;
esac
done
......@@ -64,10 +64,11 @@ fi
kde_entry()
{
xname=`basename "$link"`
cat <<EOF
# KDE Config File
[KDE Desktop Entry]
Name=`basename "$link"`
Name=$xname
Exec=wine "$path" $args
Type=Application
Comment=$descr
......@@ -78,9 +79,10 @@ EOF
gnome_entry()
{
xname=`basename "$link"`
cat <<EOF
[Desktop Entry]
Name=`basename "$link"`
Name=$xname
Exec=wine "$path" $args
Type=Application
Comment=$descr
......@@ -100,7 +102,7 @@ mdk_entry()
# copy the icon file to a specified dir and set xpmicon to the resulting path
copy_icon()
{
dir=$1
dir="$1"
mkdir -p "$dir"
mkdir -p "$dir/""`dirname "$link"`" || true
if [ -f "$icon" ]
......@@ -121,7 +123,7 @@ then
dir="$HOME/.menu/icons"
if [ -f "$icon" ]
then
mkdir -p $dir
mkdir -p "$dir"
cp "$icon" "$dir/$iconname"
xpmicon="$dir/$iconname"
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment