(Arne Babenhauserheide)
2012-06-18: created the first version of the setup script. created the first version of the setup script.
diff --git a/setup_infocalypse_on_linux.sh b/setup_infocalypse_on_linux.sh
--- a/setup_infocalypse_on_linux.sh
+++ b/setup_infocalypse_on_linux.sh
@@ -8,6 +8,22 @@
hgext="~/.local/hgext"
fi
+# enter hgext. Create it if necessary and requested
+cd $hgext
+if [ "$?" != "0" ]; then
+ echo -n "Folder \"$hgext\" does not exist. Create it? [Y/n] "
+ read create
+ if [ "$create" != "n" ]; then
+ mkdir $hgext
+ fi
+fi
+if [ "$?" != "0" ]; then
+ echo "Could not create folder $hgext. Please do it by hand."
+ exit
+fi
+cd $hgext
+
+# Get the dependencies from the distro, where possible
distro () {
if which apt-get >&/dev/null; then
dist="debian"
@@ -18,6 +34,36 @@
echo $dist
}
-if [ $(distro) == "gentoo" ]; then
- echo "gentoo"
-fi
+dist=$(distro)
+
+get_dependencies_distro () {
+ if [ "$1" == "gentoo" ]; then
+ emerge mercurial dulwhich
+ fi
+ if [ "$1" == "debian" ]; then
+ apt-get install mercurial python-dulwhich
+ fi
+}
+
+get_dependencies_distro $dist
+
+echo "Getting the needed hg repos."
+hg clone http://bitbucket.org/durin42/hg-git
+hg init infocalypse
+cd infocalypse
+wget http://127.0.0.1:8888/USK@CiKlAk~D2IZ3cJye0R5VPp0nRRUB-zKd6L5hy9qvlkE,qaG86acZQy0I5stLe5wOCt61-GQDT~h-NQ~7C2nl-lc,AQACAAE/infocalypse-for-code-sharing/3/infocalypse.bundle
+hg pull infocalypse.bundle
+
+echo "Enabling the hggit and infocalypse extensions"
+echo "
+[extensions]
+infocalypse = $(pwd)/infocalypse
+hggit = $hgext/hg-git/hggit
+" >> ~/.hgrc
+
+echo "Running the infocalypse setup"
+hg fn-setup
+hg fn-pull --aggressive --uri USK@kRM~jJVREwnN2qnA8R0Vt8HmpfRzBZ0j4rHC2cQ-0hw,2xcoQVdQLyqfTpF2DpkdUIbHFCeL4W~2X1phUYymnhM,AQACAAE/wiki_hacking.R1/19
+
+echo "Setup finished. Enjoy using Infocalypse."
+