dot

packages and services management
Log | Files | Refs | README

commit be5f22b01c43654d5a154e464d0d83d0c214d3e4
parent 40171e6111db703f0843bebde15ce79cfdacaf7a
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Sat,  3 Jun 2017 14:57:44 +0200

fixing install script

Diffstat:
Rplan9port/build -> 9port/build | 0
Rplan9port/profile -> 9port/profile | 0
Rplan9port/url -> 9port/url | 0
Mbin/io-irc | 6+-----
Mbuild | 60++++++++++++++++++++----------------------------------------
Dcmatrix/url | 1-
Dinstall | 57---------------------------------------------------------
Misync/.mbsyncrc | 2+-
Mmblaze/.mblaze/profile | 2++
Dnfs-utils/url | 1-
Mprofile | 14++++++--------
Asetup | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsic/url | 2--
Rbyacc/url -> yacc/url | 0
14 files changed, 87 insertions(+), 115 deletions(-)

diff --git a/plan9port/build b/9port/build diff --git a/plan9port/profile b/9port/profile diff --git a/plan9port/url b/9port/url diff --git a/bin/io-irc b/bin/io-irc @@ -1,5 +1 @@ -cd "$1" || exit 1 - -tail -n 80 -f out | ii-filter & - -cat > in +cd "$1" && less out diff --git a/build b/build @@ -3,33 +3,17 @@ build() { - find "$ETC/$1" -name '*.diff' -exec patch -N -p 1 -i {} \; - find "$ETC/$1" -name 'config.*' -exec cp -f {} . \; - - [ -f ./configure ] && ./configure --prefix="$PREFIX" - - make && make PREFIX="$PREFIX" install clean -} - - -compile() -{ - PREFIX="$OPT/$1" - export PREFIX - - cd "$PREFIX" || exit 1 - mkdir -p bin doc etc include lib libexec share man - ln -fs bin sbin - ln -fs ../man share/man - ln -fs . usr - cd "$SRC/$1" || exit 1 - - if [ -f "$ETC/$1/build" ] - then sh "$ETC/$1/build" - else build "$1" + export PREFIX="$OPT/$1" + + cd "$SRC/$1" && if [ -f "$ETC/$1/build" ] + then + sh "$ETC/$1/build" + else + find "$ETC/$1" -name '*.diff' -exec patch -N -p 1 -i {} \; + find "$ETC/$1" -name 'config.*' -exec cp -f {} . \; + [ -f ./configure ] && ./configure --prefix="$PREFIX" + make && make PREFIX="$PREFIX" install clean fi - - rmdir "$PREFIX"/* 2> /dev/null } @@ -73,23 +57,19 @@ index() usage() { - echo 'build [-d pkg] [-r pkg] [-i pkg] [-u pkg]' + echo 'build -[driu] pkg' exit 1 } -main() -{ - [ $# = 2 ] || usage - - case "$1" in - ( -r ) remove "$2" ;; - ( -d ) download "$2" && index "$2" ;; - ( -i ) download "$2" && compile "$2" && index "$2" ;; - ( -u ) remove "$2"&& download "$2" && compile "$2" && index "$2" ;; - ( * ) usage ;; - esac -} +# --- main --------------------------------------------------------------------- +[ $# = 2 ] || usage -main "$@" +case "$1" in +( -r ) remove "$2" ;; +( -d ) download "$2" && index "$2" ;; +( -i ) download "$2" && build "$2" && index "$2" ;; +( -u ) remove "$2"&& download "$2" && build "$2" && index "$2" ;; +( * ) usage ;; +esac diff --git a/cmatrix/url b/cmatrix/url @@ -1 +0,0 @@ -http://www.asty.org/cmatrix/dist/cmatrix-1.2a.tar.gz diff --git a/install b/install @@ -1,57 +0,0 @@ -ETC=${0%/*} -GIT=$HOME/git -MAIL=$HOME/var/mail - - -usage() -{ - printf '%s [-l] [-g] [-m address host password] [-9]\n' "$0" - exit 1 -} - - -case "$1" in - -( -l ) [ $# = 1 ] || usage - - find "$ETC" -path "$ETC/*/.*" | while read -r path - do - [ -d "$path" ] && mkdir -p "$HOME/${path#$ETC/*/}" - [ -f "$path" ] && ln -sf "$path" "$HOME/${path#$ETC/*/}" - done - - find -L "$HOME" -maxdepth 5 -type l -exec rm {} + - ;; - -( -g ) [ $# = 1 ] || usage - mkdir -p "$GIT" && cd "$GIT" || exit 1 - - git clone http://github.com/josuah/www & - git clone http://github.com/josuah/alphabet & - git clone http://github.com/josuah/artisanat & - git clone http://github.com/josuah/build & - git clone http://github.com/josuah/cgr & - git clone http://github.com/josuah/drawille & - git clone http://github.com/josuah/fungus-vs-pathogen & - git clone http://github.com/josuah/hud & - git clone http://github.com/josuah/iode & - git clone http://github.com/josuah/iomenu & - git clone http://github.com/josuah/madown & - git clone http://github.com/josuah/miniwi & - git clone http://github.com/josuah/notes & - git clone http://github.com/josuah/puissance-4 & - - wait - ;; - -( -m ) [ $# = 4 ] || usage - mkdir -p "$MAIL/cur" "$MAIL/new" "$MAIL/tmp" - - shift - printf 'machine %s\nlogin %s\npassword "%s"' "$@" > ~/.netrc - chmod 400 ~/.netrc - ;; - -( * ) usage - ;; -esac diff --git a/isync/.mbsyncrc b/isync/.mbsyncrc @@ -1,7 +1,7 @@ IMAPAccount josuah.net Host mail.gandi.net User mail@josuah.net -PassCmd "sed -rn 's/password *\"(.*)\"/\\1/ p' \"$HOME/.netrc\"" +PassCmd "sed -rn 's/^password .*\"([^\"]*)\"/\\1/ p' \"$HOME/.netrc\"" IMAPStore gandi-remote Account josuah.net diff --git a/mblaze/.mblaze/profile b/mblaze/.mblaze/profile @@ -1 +1,3 @@ Sendmail: msmtp +Local-Mailbox: mail@josuah.net +Outbox: ~/var/mail/Sent diff --git a/nfs-utils/url b/nfs-utils/url @@ -1 +0,0 @@ -http://sourceforge.net/projects/nfs/files/nfs-utils/2.1.1/nfs-utils-2.1.1.tar.gz diff --git a/profile b/profile @@ -1,11 +1,9 @@ -# build packages +export ETC="$HOME/etc" +export OPT="$HOME/opt" +export SRC="$HOME/src" +export GIT="$HOME/git" -export ROOT="$HOME/.local" -export ETC="$HOME/etc" -export OPT="$HOME/opt" -export SRC="$HOME/src" -export GIT="$HOME/git" export VAR="$HOME/var" export IRC="$VAR/irc" @@ -13,11 +11,11 @@ export MAIL="$VAR/mail/INBOX" export MUSIC="$VAR/music" -# libraries +export ROOT="$HOME/.local" export PATH="$ROOT/bin:$ETC/bin:$PATH" export LIBPATH="$ROOT/lib:$LIBPATH" -export MANPATH="$MANPATH:/man:/share/man:/usr/share/man:$ROOT/man" +export MANPATH="$ROOT/man:$MANPATH" export LD_RUN_PATH="$ROOT/lib:$LD_RUN_PATH" export LD_LIBRARY_PATH="$ROOT/lib:$LD_LIBRARY_PATH" diff --git a/setup b/setup @@ -0,0 +1,57 @@ +ETC=$(cd "$(dirname "$0")" && pwd) +GIT=$HOME/git +MAIL=$HOME/var/mail + + +usage() +{ + printf '%s [-l] [-g] [-m address host password] [-9]\n' "$0" + exit 1 +} + + +case "$1" in + +( -l ) [ $# = 1 ] || usage + + find "$ETC" -path "$ETC/*/.*" | while IFS='' read -r path + do + [ -d "$path" ] && mkdir -p "$HOME/${path#$ETC/*/}" + [ -f "$path" ] && ln -sf "$path" "$HOME/${path#$ETC/*/}" + done + + find -L "$HOME" -type l -exec rm {} + + ;; + +( -g ) [ $# = 1 ] || usage + mkdir -p "$GIT" && cd "$GIT" || exit 1 + + git clone http://github.com/josuah/www & + git clone http://github.com/josuah/alphabet & + git clone http://github.com/josuah/artisanat & + git clone http://github.com/josuah/build & + git clone http://github.com/josuah/cgr & + git clone http://github.com/josuah/drawille & + git clone http://github.com/josuah/fungus-vs-pathogen & + git clone http://github.com/josuah/hud & + git clone http://github.com/josuah/iode & + git clone http://github.com/josuah/iomenu & + git clone http://github.com/josuah/madown & + git clone http://github.com/josuah/miniwi & + git clone http://github.com/josuah/notes & + git clone http://github.com/josuah/puissance-4 & + + wait + ;; + +( -m ) [ $# = 4 ] || usage + mkdir -p "$MAIL/cur" "$MAIL/new" "$MAIL/tmp" + + shift + printf 'machine %s\nlogin %s\npassword "%s"' "$@" > ~/.netrc + chmod 400 ~/.netrc + ;; + +( * ) usage + ;; +esac diff --git a/sic/url b/sic/url @@ -1 +0,0 @@ -http://git.suckless.org/sic/snapshot/sic-1.2.tar.gz- \ No newline at end of file diff --git a/byacc/url b/yacc/url