Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

VM: install /usr/local/bin/hsgitify

  • Loading branch information...
commit bb282c83b65cea280902157f38772836c7edf7ba 1 parent cc1949c
Christian Hofstaedtler zeha authored
40 util/build/hsgitify
... ... @@ -0,0 +1,40 @@
  1 +#!/bin/bash
  2 +
  3 +echo "Setting up system for development usage..."
  4 +echo ""
  5 +
  6 +if [ -d /usr/lib/hs/agent/.git ]; then
  7 + echo "This system already has .git directories in /usr/lib/hs/."
  8 + echo "E: Aborting to not overwrite your work."
  9 + exit 1
  10 +fi
  11 +
  12 +apt-get install -y build-essential git mr bundler rsync
  13 +tmpdir="GITIFY-TMP"
  14 +
  15 +cd /root
  16 +rm -rf ${tmpdir}
  17 +mkdir ${tmpdir}
  18 +pushd ${tmpdir}
  19 +for r in /usr/lib/hs/*; do
  20 + repo=hs-$(basename $r)
  21 + git clone git://github.com/hostingstack/${repo}
  22 + mv ${repo}/.git $r/
  23 +done
  24 +popd
  25 +rm -rf ${tmpdir}
  26 +
  27 +git clone git://github.com/hostingstack/hs-nginx
  28 +
  29 +echo ""
  30 +echo "Done."
  31 +echo ""
  32 +echo "nginx repository: /root/hs-nginx"
  33 +echo "other repositories: /usr/lib/hs/*"
  34 +echo ""
  35 +echo "Please run these before committing:"
  36 +echo ""
  37 +echo ' git config --global user.name "Firstname Lastname"'
  38 +echo ' git config --global user.email "your_email@youremail.com"'
  39 +echo ""
  40 +
6 util/build/post-scripts/10-install-stuff
@@ -78,9 +78,13 @@ echo "${PACKAGES}" > "$MNTPOINT"/root/packages/list
78 78 cp "$HS_BASEPATH"/util/build/hspostinst "$MNTPOINT"/var/hspostinst
79 79 chmod a+x "$MNTPOINT"/var/hspostinst
80 80
81   -cp "$HS_BASEPATH"/util/build/hshostname "$MNTPOINT"/etc/init.d
  81 +cp "$HS_BASEPATH"/util/build/hshostname "$MNTPOINT"/etc/init.d/
  82 +chmod a+x "$MNTPOINT"/etc/init.d/hshostname
82 83 chroot "$MNTPOINT" insserv hshostname
83 84
  85 +cp "$HS_BASEPATH"/util/build/hsgitify "$MNTPOINT"/usr/local/bin/
  86 +chmod a+x "$MNTPOINT"/usr/local/bin/hsgitify
  87 +
84 88 echo "The new VM has these SSH Keys:"
85 89 for key in "$MNTPOINT"/etc/ssh/ssh_host_*_key.pub ; do
86 90 chroot "$MNTPOINT" ssh-keygen -l -f ${key##$MNTPOINT}

0 comments on commit bb282c8

Please sign in to comment.
Something went wrong with that request. Please try again.