diff --git a/Makefile b/Makefile index db68fa7..e248a64 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,21 @@ -install: apt bin templates man completion files efingerd menu postfix updatemotd -.PHONY: apt bin templates man completion files efingerd menu postfix updatemotd +install: apt bin templates man completion files efingerd menu postfix updatemotd source +.PHONY: apt bin templates man completion files efingerd menu postfix updatemotd source apt: xargs -a pkglist sudo apt install -y +source: + @while IFS= read -r line; do \ + name=$$(printf "%s" "$$line" | awk -F "\t" '{print $$1}'); \ + repo=$$(printf "%s" "$$line" | awk -F "\t" '{print $$2}'); \ + if [ ! -d "/var/packages/$${name}" ]; then \ + mkdir -p "/var/packages/$${name}"; \ + git clone "$$repo" "/var/packages/$${name}"; \ + else \ + printf "%s already cloned\\n" "$${name}"; \ + fi; \ + done < "pkglist-source" + bin: stow -t "/usr/local/bin" bin diff --git a/pkglist-source b/pkglist-source index bbac867..4687eb8 100644 --- a/pkglist-source +++ b/pkglist-source @@ -1,4 +1,4 @@ -burrow (https://github.com/jamestomasino/burrow.git) -fellowsh (git://circumlunar.space/fellowsh) -gophernicus (https://github.com/kimholviala/gophernicus.git) -pb (https://tildegit.org/tomasino/pb.git) +burrow https://github.com/jamestomasino/burrow.git +fellowsh git://circumlunar.space/fellowsh +gophernicus https://github.com/kimholviala/gophernicus.git +pb https://tildegit.org/tomasino/pb.git