dot

packages and services management
Log | Files | Refs | README

commit f1843c85156098300b073c05bf8661524b3b3886
parent f3e43b478b9e7f67548a4fdce7c55b6d473daa7b
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 16 Feb 2018 14:50:19 +0100

./configure: rely less on features of sh and more on find

Diffstat:
MREADME | 9+++++----
Rbin/git-gph -> bin/git-gopher | 0
Mconfigure | 15++++++++-------
3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/README b/README @@ -9,7 +9,7 @@ SYNOPSIS DESCRIPTION ./configure symlinks files from this directory into the $ETC directory as - defined in ./dot/profile and symlinks everything in dot into the home + defined in ./.profile and symlinks everything matching .* into the home directory. ENVIRONMENT @@ -50,7 +50,8 @@ FILES ./man/ Contains manual pages for utilities developed inside of ./bin/. - ./dot/ Contains files to be symlinked into the home directory. + ./.* Files to be symlinked into the home directory, with exception of + .git. ./skel/ Contains files to be manually copied in-place and then edited. @@ -60,8 +61,8 @@ SEE ALSO A package manager permits to fetch and install missing software and libraries according to rules in subdirectories of ./pack. - daemon(1) - A daemon management script which calls the scirpts in ./daemon to + run(1), log(1) + A daemon management script which calls the scirpts in ./run to manage different software in an uniform manner. xdg-open(1) diff --git a/bin/git-gph b/bin/git-gopher diff --git a/configure b/configure @@ -3,12 +3,13 @@ cd "$0/.." . ./.profile -find * -type d -exec mkdir -p "${ETC}/{}" \; -find * -type f -exec ln -sf "${PWD}/{}" "${ETC}/{}" \; -find * -type l -exec ln -sf "${PWD}/{}" "${ETC}/{}" \; +find . -path './.*' -prune \ + -o -type d -exec mkdir -p "${ETC}/{}" \; \ + -o -type f -exec ln -sf "${PWD}/{}" "${ETC}/{}" \; -find .* -name .git -prune -o -type d -exec mkdir -p "${HOME}/{}" \; -find .* -name .git -prune -o -type f -exec ln -sf "${PWD}/{}" "${HOME}/{}" \; -find .* -name .git -prune -o -type l -exec ln -sf "${PWD}/{}" "${HOME}/{}" \; +find .* -name .git -prune -o -name . -prune -o -name .. -prune \ + -o -type d -exec mkdir -p "${HOME}/{}" \; \ + -o -type f -exec ln -sf "${PWD}/{}" "${HOME}/{}" \; \ + -o -type l -exec ln -sf "${PWD}/{}" "${HOME}/{}" \; -find -L "${HOME}" -maxdepth 2 -type l -exec rm {} + +find -L "${HOME}" -maxdepth 2 -type l -exec rm {} +