2013-03-16 17:23:22 +00:00
|
|
|
#!/bin/sh
|
|
|
|
SRC=$1
|
|
|
|
DSTDIR=$2
|
|
|
|
VMNAME=$3
|
|
|
|
VMDIR=$4
|
2014-07-10 14:28:05 +00:00
|
|
|
XDGICON=$5
|
2013-03-16 17:23:22 +00:00
|
|
|
|
|
|
|
DST=$DSTDIR/$VMNAME-$(basename $SRC)
|
|
|
|
|
2015-11-13 01:48:15 +00:00
|
|
|
if ! [ -r "$SRC" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2014-07-10 14:28:05 +00:00
|
|
|
sed \
|
|
|
|
-e "s/%VMNAME%/$VMNAME/" \
|
2013-03-16 17:23:22 +00:00
|
|
|
-e "s %VMDIR% $VMDIR " \
|
2014-07-10 14:28:05 +00:00
|
|
|
-e "s/%XDGICON%/$XDGICON/" \
|
2013-03-16 17:23:22 +00:00
|
|
|
<$SRC >$DST
|
|
|
|
|
|
|
|
|