summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-10-08 11:06:31 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-10-08 11:06:31 +0200
commit83afa97392f3c0e2de31a2d91438b7206644ecc8 (patch)
tree3a914410f21105e79e8bd338451dc6fbe7c52291 /include
parentffa27318e25ad831e9c45bcbe4661880fda75232 (diff)
Updated bootstrap. No guarantee thet it really works, though
Diffstat (limited to 'include')
-rwxr-xr-xinclude/bootstrap47
1 files changed, 13 insertions, 34 deletions
diff --git a/include/bootstrap b/include/bootstrap
index e2d7e17..658735f 100755
--- a/include/bootstrap
+++ b/include/bootstrap
@@ -2,52 +2,31 @@
# bootstrap - populate a home with the most necessary scripts
# After running this, other packages can be installed using 'pkg'
-HG=hg
+typeset -i rcempty=0
# zsh keeps complaining about not having a configuration,
# so let's be kind and give it an empty one.
-if ! [[ -e $HOME/.zshrc ]] {
- RCEMPTY=yes
- touch $HOME/.zshrc
+if ! [[ -e ~/.zshrc ]] {
+ rcempty=1
+ touch ~/.zshrc
}
# Make basic dirctories
mkdir -p ~/bin
-mkdir -p ~/lib
-mkdir -p ~/packages/.collected/{bin,doc,man/man{1..8},etc,include}
-mkdir -p ~/var/tmp/incoming
+mkdir -p ~/packages/.collected/man/man{1..8}
-if ( ! which python &> /dev/null ) {
- echo "No Python found. Sorry."
+if ! which git &> /dev/null; then
+ echo "git not found. Sorry."
exit 200
-}
-
-if ( ! which hg &> /dev/null) {
- echo 'Mercurial not found, installing...'
- cd ~/packages
- ssh derf.homelinux.org 'tar cz -C ~/var/packages_root .mercurial-bin' | tar xz
- HG="$HOME/packages/.mercurial-bin/mercurial-1.0.1/hg"
-}
+fi
cd ~/packages
-echo "fetching core"
-$HG clone ssh://derf.homelinux.org/var/packages_root/core
+echo "fetching core..."
+git clone ssh://derf.homelinux.org/var/packages_root/core
cd core
bin/checklinks
-for i in bin/*(*); {
- ln -s ../packages/core/$i $HOME/$i
-}
-
-if ([ -d $HOME/packages/.mercurial-bin ]) {
- cd ~/packages/.mercurial-bin
- ~/bin/checklinks
-}
-
-[ "$RCEMPTY" = yes ] && rm $HOME/.zshrc
-
-PATH=$HOME/bin:$PATH
-
-rehash
+bin/pkg eval populate_collected core
+bin/pkg eval exec_hook core post-add
-pkg add zsh
+(( rcempty )) && rm ~/.zshrc