From 0754c59ca601825e4ccec5a891c503ff2acb2ade Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 26 Aug 2014 12:25:22 +0200 Subject: Add ovirt-related scripts --- tools/config | 4 ++++ tools/get-qxl.sh | 29 +++++++++++++++++++++++++++++ tools/get-spice-agent.sh | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 tools/config create mode 100755 tools/get-qxl.sh create mode 100755 tools/get-spice-agent.sh diff --git a/tools/config b/tools/config new file mode 100644 index 0000000..e043fb4 --- /dev/null +++ b/tools/config @@ -0,0 +1,4 @@ +QXL_RELEASE=qxl-0.1-21 +QXL_URL=http://www.spice-space.org/download/windows/qxl/${QXL_RELEASE} +SPICE_RELEASE=vdagent-win-0.7.2 +SPICE_URL=http://www.spice-space.org/download/windows/vdagent/${SPICE_RELEASE} diff --git a/tools/get-qxl.sh b/tools/get-qxl.sh new file mode 100755 index 0000000..f54829e --- /dev/null +++ b/tools/get-qxl.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +if [ -f $(dirname ${BASH_SOURCE[0]})/config ]; then + source $(dirname ${BASH_SOURCE[0]})/config +else + echo "Requires config to be present." + echo "$(dirname ${BASH_SOURCE[0]})/config couldn't be found." + exit 1 +fi + +if [ -z $1 ]; then + echo "Usage: get-qxl.sh " + exit 1 +fi + +pushd $1 + +for file in qxl_8k2R2_x64.zip qxl_w7_x64.zip qxl_w7_x86.zip qxl_xp_x86.zip +do + wget ${QXL_URL}/${file} + unzip ${file} + rm ${file} +done + +mv xp winxp +mv w7 win7 +mv 2k8R2 win2k8r2 + +popd diff --git a/tools/get-spice-agent.sh b/tools/get-spice-agent.sh new file mode 100755 index 0000000..4520c53 --- /dev/null +++ b/tools/get-spice-agent.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +if [ -f $(dirname ${BASH_SOURCE[0]})/config ]; then + source $(dirname ${BASH_SOURCE[0]})/config +else + echo "Requires config to be present." + echo "$(dirname ${BASH_SOURCE[0]})/config couldn't be found." + exit 1 +fi + +if [ -z $1 ]; then + echo "Usage get-spice-agent.sh " + echo "Note!: Destination directory requires full path." + exit 1 +fi + +TMP_LOC=/tmp/$$-${RANDOM} +mkdir ${TMP_LOC} +pushd ${TMP_LOC} + +for file in mingw32-spice-vdagent-0.7.2-1.fc19.noarch.rpm mingw64-spice-vdagent-0.7.2-1.fc19.noarch.rpm +do + wget ${SPICE_URL}/${file} + rpm2cpio ${file} | cpio -idmv +done + +mkdir -p $1/bin/{vdagent_x86,vdagent_x64} +cp -v ./usr/i686-w64-mingw32/sys-root/mingw/bin/vdagent.exe $1/bin/vdagent_x86/ +cp -v ./usr/i686-w64-mingw32/sys-root/mingw/bin/vdservice.exe $1/bin/vdagent_x86/ +cp -v ./usr/x86_64-w64-mingw32/sys-root/mingw/bin/vdagent.exe $1/bin/vdagent_x64/ +cp -v ./usr/x86_64-w64-mingw32/sys-root/mingw/bin/vdservice.exe $1/bin/vdagent_x64/ + +popd + +rm -rf ${TMP_LOC} -- cgit v1.2.3