summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorScott Moser <smoser@nelson>2010-01-05 12:44:18 -0500
committerScott Moser <smoser@nelson>2010-01-05 12:44:18 -0500
commit48acacce6a964930b78ad4400c5e65aa66e63063 (patch)
treeb4ce97ccc2ab856cf67371a82a0f91ef8d8efeac /install.sh
parent684303ef903ab7e8e642a7795e042829fd51b6da (diff)
downloadvyos-cloud-init-48acacce6a964930b78ad4400c5e65aa66e63063.tar.gz
vyos-cloud-init-48acacce6a964930b78ad4400c5e65aa66e63063.zip
add hacked 'install.sh' for installing to a directory
this 'install.sh <dir>' script ends up rendering a directory structure under <dir> like would be packaged in a deb
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/install.sh b/install.sh
new file mode 100755
index 00000000..aa46d5c1
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# cd $(DEB_SRCDIR) && $(call cdbs_python_binary,python$(cdbs_python_compile_version)) $(DEB_PYTHON_SETUP_CMD) install --root=$(cdbs_python_destdir) $(DEB_PYTHON_INSTALL_ARGS_ALL)
+# for ddir in $(cdbs_python_destdir)/usr/lib/python?.?/dist-packages; do \
+# [ -d $$ddir ] || continue; \
+# sdir=$$(dirname $$ddir)/site-packages; \
+# mkdir -p $$sdir; \
+# tar -c -f - -C $$ddir . | tar -x -f - -C $$sdir; \
+# rm -rf $$ddir; \
+# done
+
+DEB_PYTHON_INSTALL_ARGS_ALL="--no-compile -O0 --install-layout=deb"
+
+destdir=$(readlink -f ${1})
+[ -z "${destdir}" ] && { echo "give destdir"; exit 1; }
+cd $(dirname ${0})
+./setup.py install --root=${destdir} ${DEB_PYTHON_INSTALL_ARGS_ALL}
+
+mkdir -p ${destdir}/usr/lib/pyshared
+for x in ${destdir}/usr/lib/python2.6/dist-packages/*; do
+ [ -d "$x" ] || continue
+ [ ! -d "${destdir}/usr/lib/pyshared/${x##*/}" ] ||
+ rm -Rf "${destdir}/usr/lib/pyshared/${x##*/}"
+ mv $x ${destdir}/usr/lib/pyshared
+done
+rm -Rf ${destdir}/usr/lib/python2.6
+
+for x in "${destdir}/usr/bin/"*.py; do
+ [ -f "${x}" ] && mv "${x}" "${x%.py}"
+done