diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-09-28 23:23:05 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-09-28 23:23:05 +0200 |
commit | e0b9949d516be918bbb0695ac68164511aef8200 (patch) | |
tree | d9da30acba1c332e0c99bab89e7ddcbad05d60d0 /include/bootstrap | |
parent | aabc1a4fef1e42f13435d88739f32c65fa0b64a8 (diff) |
Improved source code readability
Diffstat (limited to 'include/bootstrap')
-rwxr-xr-x | include/bootstrap | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/bootstrap b/include/bootstrap index 09820fa..6d4013e 100755 --- a/include/bootstrap +++ b/include/bootstrap @@ -49,7 +49,6 @@ if ! [[ -e ~/.zshrc ]] { touch ~/.zshrc } -# Make basic dirctories echo 'Creating the basic directory structure' mkdir -p ~/bin path=(~/bin $path) @@ -68,11 +67,14 @@ cd caretaker echo "Writing $XDG_CONFIG_HOME/caretaker/caretaker.conf" mkdir -p $XDG_CONFIG_HOME/caretaker + cat > $XDG_CONFIG_HOME/caretaker/caretaker.conf <<- flurbl PKG_ROOT=($PKG_ROOT) PKG_DIR="${PKG_DIR/$HOME/\$HOME}" flurbl -if ((pkglist_cgi)) { + +if (( pkglist_cgi )) { + if which curl &> /dev/null; then getcmd='curl -s' elif which wget &> /dev/null; then @@ -81,23 +83,26 @@ if ((pkglist_cgi)) { print STDERR "Unable to find a proper download program, fix $PKG_DIR/.pkglist\n" getcmd='echo fixme >&2; exit 1;' fi + cat >> $XDG_CONFIG_HOME/caretaker/caretaker.conf <<-flurbl PKGLIST_LOCAL=1 PKGLIST_PATH=$PKG_DIR/.pkglist flurbl + cat > $PKG_DIR/.pkglist <<-flurbl #!/bin/sh $getcmd $pkglist_cgi_url flurbl + chmod +x $PKG_DIR/.pkglist } echo 'Installing caretaker package' rehash + bin/checklinks bin/ct eval update_collected caretaker bin/ct eval exec_hook caretaker post-add - bin/ct update if (( rcempty )) { |