From f8a529ad39b0e9f46527e7f806781f33ce5f9b81 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Fri, 7 Sep 2018 20:30:12 +0200 Subject: [PATCH] Don't need nanosecond precision, seconds work with busybox --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 70264b5..a604b2f 100644 --- a/.bashrc +++ b/.bashrc @@ -174,7 +174,7 @@ if [ -e ~/.ssh/config.d ]; then newestconfig=$(find ~/.ssh/config.d/* -printf '%TY-%Tm-%Td %.8TT %p\n' | sort -r | head -n1 | awk '{print $3}') if [ "$newestconfig" -nt ~/.ssh/config ]; then # 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 -Is) # Lets preserve order, so you can have 00_generic 10_homestuff 20_work1 21_work2 and such find ~/.ssh/config.d/* -type f -print0 | sort -z | xargs -0 -n1 cat > ~/.ssh/config fi