dot

packages and services management
Log | Files | Refs | README

commit abcc55dfeefcb1d19ee6039e0980d39676c0d455
parent b7daf0c2433cd59c40afd5b839677d0c49217c60
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri,  2 Mar 2018 14:05:14 +0100

.

Diffstat:
M.bashrc | 2++
Mbin/pack | 18+++++++++---------
Mpack/dvtm/config.mk | 2+-
Tpack/libav/build | 0
4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -1,3 +1,5 @@ +export TERM=vt220 + export PS1='$([ "$?" -gt 0 ] && printf "\033[31;1mx\033[m\n\r")' export PS1="$PS1$(printf '\033]0;%s\a' '$PWD') $(uname -n)$([ "$(whoami)" = "root" ] && printf '#' || printf '$') " diff --git a/bin/pack b/bin/pack @@ -1,8 +1,7 @@ #!/bin/sh -e -export PKG="$PACK/$2" -export SRC="$PACKROOT/src/$2" export OPT="$PACKROOT/opt/$2" +export SRC="$PACKROOT/src/$2" export CFLAGS="-I'$PACKROOT/include'" export LDFLAGS="-L'$PACKROOT/lib'" @@ -10,7 +9,7 @@ case "$1" in (tar) [ -d "$SRC" ] && exit 0 || mkdir -p "$SRC" - IFS="" read -r url < "$PKG/tar" + IFS="" read -r url < "$PACK/$2/tar" curl -#L "$url" | case "$url" in (*.tgz|*.tar.gz) gzip -d - ;; @@ -18,19 +17,19 @@ case "$1" in (*.txz|*.tar.xz) xz -d - ;; esac | tar -xf - -C "$SRC" || rmdir "$SRC" - find "$SRC" -mindepth 2 -maxdepth 2 -exec mv {} "$SRC" \; + find "$SRC" -mindepth 2 -maxdepth 2 -exec mv {} "$SRC" + rmdir "$SRC"/* 2>/dev/null || true ;; (git) [ -d "$SRC" ] && exit 0 mkdir -p "$(dirname "$SRC")" - IFS="" read -r url < "$PKG/git" + IFS="" read -r url < "$PACK/$2/git" git clone "$url" "$SRC" ;; (get) - [ -f "$PKG/tar" ] && exec "$0" tar "$2" - [ -f "$PKG/git" ] && exec "$0" git "$2" + [ -f "$PACK/$2/tar" ] && exec "$0" tar "$2" + [ -f "$PACK/$2/git" ] && exec "$0" git "$2" exit 1 ;; (build) @@ -38,12 +37,13 @@ case "$1" in cd "$SRC" mkdir -p "$OPT" - exec "$PKG/build" + exec "$PACK/$2/build" ;; (add) [ -d "$OPT" ] || "$0" build "$2" || rm -r "$OPT" - cd "$OPT" && exec find * -type d \ + cd "$OPT" + exec find * -type d \ -exec mkdir -p "$PACKROOT/{}" \; -o \ -exec ln -sf "$OPT/{}" "$PACKROOT/{}" \; ;; diff --git a/pack/dvtm/config.mk b/pack/dvtm/config.mk @@ -4,7 +4,7 @@ PREFIX ?= /usr/local MANPREFIX = ${PREFIX}/share/man # specify your systems terminfo directory # leave empty to install into your home folder -TERMINFO := ${DESTDIR}${PREFIX}/share/terminfo +TERMINFO = INCS = -I. LIBS = -lc -lutil -lcurses diff --git a/pack/libav/build b/pack/libav/build