Skip to content

Commit

Permalink
VM: install /usr/local/bin/hsgitify
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Apr 15, 2012
1 parent cc1949c commit bb282c8
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
40 changes: 40 additions & 0 deletions 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 ""

6 changes: 5 additions & 1 deletion util/build/post-scripts/10-install-stuff
Expand Up @@ -78,9 +78,13 @@ echo "${PACKAGES}" > "$MNTPOINT"/root/packages/list
cp "$HS_BASEPATH"/util/build/hspostinst "$MNTPOINT"/var/hspostinst cp "$HS_BASEPATH"/util/build/hspostinst "$MNTPOINT"/var/hspostinst
chmod a+x "$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 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:" echo "The new VM has these SSH Keys:"
for key in "$MNTPOINT"/etc/ssh/ssh_host_*_key.pub ; do for key in "$MNTPOINT"/etc/ssh/ssh_host_*_key.pub ; do
chroot "$MNTPOINT" ssh-keygen -l -f ${key##$MNTPOINT} chroot "$MNTPOINT" ssh-keygen -l -f ${key##$MNTPOINT}
Expand Down

0 comments on commit bb282c8

Please sign in to comment.