You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
257 B
21 lines
257 B
11 years ago
|
#!/bin/sh
|
||
|
SRC=$1
|
||
|
DSTDIR=$2
|
||
|
VMNAME=$3
|
||
|
VMDIR=$4
|
||
10 years ago
|
XDGICON=$5
|
||
11 years ago
|
|
||
|
DST=$DSTDIR/$VMNAME-$(basename $SRC)
|
||
|
|
||
9 years ago
|
if ! [ -r "$SRC" ]; then
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
10 years ago
|
sed \
|
||
|
-e "s/%VMNAME%/$VMNAME/" \
|
||
11 years ago
|
-e "s %VMDIR% $VMDIR " \
|
||
10 years ago
|
-e "s/%XDGICON%/$XDGICON/" \
|
||
11 years ago
|
<$SRC >$DST
|
||
|
|
||
|
|