dot

packages and services management
Log | Files | Refs | README

commit aff552006cefcc038f0c2efa7745855f86be7ece
parent 3020f1b95a10938c74e153dbf1a3e0a87d796433
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 12 Aug 2018 19:13:07 +0200

Merge branch 'master' of git.josuah.net:conf

Diffstat:
Abin/pack-build | 2++
Abin/pack-chroot | 2++
Abin/pack-cvs | 2++
Abin/pack-del | 2++
Mbin/pack-get | 2+-
Abin/pack-git | 2++
Abin/pack-tar | 2++
Abin/pack-up | 2++
Rbin/pack -> pack/README | 0
Apack/bin/pack-add | 16++++++++++++++++
Rbin/pack-build -> pack/bin/pack-build | 0
Rbin/pack-chroot -> pack/bin/pack-chroot | 0
Rbin/pack-cvs -> pack/bin/pack-cvs | 0
Rbin/pack-del -> pack/bin/pack-del | 0
Apack/bin/pack-get | 7+++++++
Rbin/pack-git -> pack/bin/pack-git | 0
Rbin/pack-tar -> pack/bin/pack-tar | 0
Rbin/pack-up -> pack/bin/pack-up | 0
18 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/bin/pack-build b/bin/pack-build @@ -0,0 +1 @@ +../pack/bin/pack-build+ \ No newline at end of file diff --git a/bin/pack-chroot b/bin/pack-chroot @@ -0,0 +1 @@ +../pack/bin/pack-chroot+ \ No newline at end of file diff --git a/bin/pack-cvs b/bin/pack-cvs @@ -0,0 +1 @@ +../pack/bin/pack-cvs+ \ No newline at end of file diff --git a/bin/pack-del b/bin/pack-del @@ -0,0 +1 @@ +../pack/bin/pack-del+ \ No newline at end of file diff --git a/bin/pack-get b/bin/pack-get @@ -3,7 +3,7 @@ export VERSION=$(tail -n 1 /etc/pack/$1/version) -printf '\033[1m[ downloading %s version ]\033[m\n' "$1" "$VERSION" +printf '\033[1m[ downloading version %s ]\033[m\n' "$1" "$VERSION" case $VERSION in (git) diff --git a/bin/pack-git b/bin/pack-git @@ -0,0 +1 @@ +../pack/bin/pack-git+ \ No newline at end of file diff --git a/bin/pack-tar b/bin/pack-tar @@ -0,0 +1 @@ +../pack/bin/pack-tar+ \ No newline at end of file diff --git a/bin/pack-up b/bin/pack-up @@ -0,0 +1 @@ +../pack/bin/pack-up+ \ No newline at end of file diff --git a/bin/pack b/pack/README diff --git a/pack/bin/pack-add b/pack/bin/pack-add @@ -0,0 +1,16 @@ +#!/bin/sh -e +# build a program into /opt/<package>/<version> and symlink it into /local + +export VERSION=$(tail -n 1 "/etc/pack/$1/version") + +test -f "/etc/pack/$1/dep" && xargs -n 1 pack-add </etc/pack/$1/dep +test -d "/opt/$1/$VERSION" || pack-build "$1" || { + rm -rf "/opt/$1/$VERSION" + exit 1 +} +printf '\033[1m[ installing %s ]\033[m\n' "$1" +ln -sf "$VERSION" "/opt/$1/$VERSION/cur" +mv -f "/opt/$1/$VERSION/cur" "/opt/$1" +cd "/opt/$1/cur" +find -L * -type d -exec sh -c 'mkdir -p "/local/$0"' {} \; +find -L * -type f -exec sh -c 'ln -sf "/opt/$1/cur/$0" "/local/$0"' {} "$1" \; diff --git a/bin/pack-build b/pack/bin/pack-build diff --git a/bin/pack-chroot b/pack/bin/pack-chroot diff --git a/bin/pack-cvs b/pack/bin/pack-cvs diff --git a/bin/pack-del b/pack/bin/pack-del diff --git a/pack/bin/pack-get b/pack/bin/pack-get @@ -0,0 +1,7 @@ +#!/bin/sh -e +# get a package's source from either tar, git, cvs + +printf '\033[1m[ downloading %s ]\033[m\n' "$1" +test -f "/etc/pack/$1/tar" && exec pack-tar "$1" +test -f "/etc/pack/$1/git" && exec pack-git "$1" +test -f "/etc/pack/$1/cvs" && exec pack-cvs "$1" diff --git a/bin/pack-git b/pack/bin/pack-git diff --git a/bin/pack-tar b/pack/bin/pack-tar diff --git a/bin/pack-up b/pack/bin/pack-up