dot

packages and services management
Log | Files | Refs | README

commit 8ec868a72260bd0b0b49acab007d8f5e85f7eb35
parent 65f8c3aab5b527de26f1432c78279384c7b5eaea
Author: Josuah Demangeon <mail@josuah.net>
Date:   Wed, 29 Nov 2017 14:31:17 +0100

Merge branch 'master' of git.josuah.net:srv/git/etc

Modifying the repos both as root and as josuah

Diffstat:
Mbin/etc | 8+++++++-
Mbin/tls | 2++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/bin/etc b/bin/etc @@ -32,11 +32,17 @@ case $1 in ;; (setup) mkdir -p "$HOME/.config" + [ -f "$ETC/cron/$2" ] && cat "$ETC/cron/$2" >> "$HOME/.config/cron" && sort -uo "$HOME/.config/cron" "$HOME/.config/cron" + [ -f "$ETC/inet/$2" ] && cat "$ETC/inet/$2" >> "$HOME/.config/inet" && sort -uo "$HOME/.config/inet" "$HOME/.config/inet" - [ -e "$ETC/skel/$2" ] && cp -r "$ETC/skel/$2/" "/etc/$2" + + [ -d "$ETC/skel/$2" ] && mkdir -p "/etc/$2" && + cp -ri "$ETC/skel/$2"/* "/etc/$2" + + [ -f "$ETC/skel/$2" ] && cp -i "$ETC/skel/$2" "/etc/$2" ;; (fonts) fc-cache "$ETC/fonts" diff --git a/bin/tls b/bin/tls @@ -2,7 +2,9 @@ case $1 in (update) + [ $# -eq 2 ] || exec "$0" set -e + mkdir -p "$(dirname "$2")" openssl genpkey -algorithm RSA -out "$2.key" \ -pkeyopt rsa_keygen_bits:2048 chmod 400 "$2.key"