1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00
This commit is contained in:
2017-10-13 11:41:12 +02:00
parent 444e6e1ce8
commit 8edad9d0ab

View File

@@ -171,7 +171,7 @@ if [ -e ~/.ssh/config.d ]; then
#if find ~/.ssh/config.d -mindepth 1 -print -quit | grep -q .; then #if find ~/.ssh/config.d -mindepth 1 -print -quit | grep -q .; then
# Do we have config files in that directory? # Do we have config files in that directory?
if find ~/.ssh/config.d -print -quit | grep -q .; then if find ~/.ssh/config.d -print -quit | grep -q .; then
newestconfig=$(find ~/.ssh/config.d/* -printf '%T+ %p\n' | sort -r | head -n1 | awk '{print $2}') newestconfig=$(find ~/.ssh/config.d/* -printf '@T+ %p\n' | sort -r | head -n1 | awk '{print $2}')
if [ "$newestconfig" -nt ~/.ssh/config ]; then if [ "$newestconfig" -nt ~/.ssh/config ]; then
# We found a config that's newer than the generated config file, re-generate # We found a config that's newer than the generated config file, re-generate
[ -e ~/.ssh/config ] && mv ~/.ssh/config ~/.ssh/config.bak.$(date -Ins) [ -e ~/.ssh/config ] && mv ~/.ssh/config ~/.ssh/config.bak.$(date -Ins)