Permalink
Browse files

VM: install /usr/local/bin/hsgitify

  • Loading branch information...
1 parent cc1949c commit bb282c83b65cea280902157f38772836c7edf7ba @zeha zeha committed Apr 15, 2012
Showing with 45 additions and 1 deletion.
  1. +40 −0 util/build/hsgitify
  2. +5 −1 util/build/post-scripts/10-install-stuff
View
40 util/build/hsgitify
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+echo "Setting up system for development usage..."
+echo ""
+
+if [ -d /usr/lib/hs/agent/.git ]; then
+ echo "This system already has .git directories in /usr/lib/hs/."
+ echo "E: Aborting to not overwrite your work."
+ exit 1
+fi
+
+apt-get install -y build-essential git mr bundler rsync
+tmpdir="GITIFY-TMP"
+
+cd /root
+rm -rf ${tmpdir}
+mkdir ${tmpdir}
+pushd ${tmpdir}
+for r in /usr/lib/hs/*; do
+ repo=hs-$(basename $r)
+ git clone git://github.com/hostingstack/${repo}
+ mv ${repo}/.git $r/
+done
+popd
+rm -rf ${tmpdir}
+
+git clone git://github.com/hostingstack/hs-nginx
+
+echo ""
+echo "Done."
+echo ""
+echo "nginx repository: /root/hs-nginx"
+echo "other repositories: /usr/lib/hs/*"
+echo ""
+echo "Please run these before committing:"
+echo ""
+echo ' git config --global user.name "Firstname Lastname"'
+echo ' git config --global user.email "your_email@youremail.com"'
+echo ""
+
View
6 util/build/post-scripts/10-install-stuff
@@ -78,9 +78,13 @@ echo "${PACKAGES}" > "$MNTPOINT"/root/packages/list
cp "$HS_BASEPATH"/util/build/hspostinst "$MNTPOINT"/var/hspostinst
chmod a+x "$MNTPOINT"/var/hspostinst
-cp "$HS_BASEPATH"/util/build/hshostname "$MNTPOINT"/etc/init.d
+cp "$HS_BASEPATH"/util/build/hshostname "$MNTPOINT"/etc/init.d/
+chmod a+x "$MNTPOINT"/etc/init.d/hshostname
chroot "$MNTPOINT" insserv hshostname
+cp "$HS_BASEPATH"/util/build/hsgitify "$MNTPOINT"/usr/local/bin/
+chmod a+x "$MNTPOINT"/usr/local/bin/hsgitify
+
echo "The new VM has these SSH Keys:"
for key in "$MNTPOINT"/etc/ssh/ssh_host_*_key.pub ; do
chroot "$MNTPOINT" ssh-keygen -l -f ${key##$MNTPOINT}

0 comments on commit bb282c8

Please sign in to comment.