ref: 96efcddaa6c90f81e1e5ccaf6a49b35d935aec79
parent: 2fa650c0e4cbbf0777eb10d91c0f4018cada9bb1
author: Alex Musolino <amusolino@topcon.com>
date: Mon Nov 14 10:13:22 EST 2022
archive.rc: use $HOME instead of hardcoded path
--- a/sdrip/archive.rc
+++ b/sdrip/archive.rc
@@ -4,9 +4,9 @@
year=substr($1, 1, 4)
month=substr($1, 5, 2)
dirs[sprintf("%s/%s", year, month)] = 1
- printf "mv -n %s /home/alex/img/%s/%s/%s\n", $0, year, month, $0
+ printf "mv -n %s %s/img/%s/%s/%s\n", $0, ENVIRON["HOME"], year, month, $0
}
END{
for(d in dirs)
- printf "mkdir -p /home/alex/img/%s\n", d
+ printf "mkdir -p %s/img/%s\n", ENVIRON["HOME"], d
}' | tac