-o -name .hg -prune -o -name .editor-backups -prune \
-o -name .undo-tree-history -prune \) 2>/dev/null | grep -iP --color=auto -- "$*" ||:
rgv -- "$*" $paths /a/work.org ||:
- }
+}
# for use in /f/bind
done | ec
}
+ctof() {
+ units "tempC($1)" tempF
+}
+
+ftoc() {
+ units "tempF($1)" tempC
+}
+
export BASEFILE_DIR=/a/bin/fai-basefiles
#export ANDROID_HOME=/a/opt/android-home
echo copying output to $log_path
exec &> >(pee cat 'ts "%F %T"|dd of='$log_path' status=none')
-
+# print some non-default opts
if $verbose; then
- printf " options: conf_only=%s\ndry_run=%s\nrate_limit=%s\nverbose=%s\ncmd_arg=%s\n" "$conf_only" "$dry_run" "$rate_limit" "$verbose" "$cmd_arg"
+ opts_show=()
+ if ! $conf_only; then
+ opts_show+=(conf_only=true)
+ fi
+ if ! $dry_run; then
+ opts_show+=(dry_run=true)
+ fi
+ if [[ $rate_limit != no ]]; then
+ opts_show+=("rate_limit=$rate_limit")
+ fi
+ if [[ $cmd_arg != run ]]; then
+ opts_show+=(cmd_arg=$cmd_arg)
+ fi
+ if (( $opts_show >= 1 )); then
+ first=true
+ for opt in ${opts_show[@]}; do
+ if $first; then
+ printf "%s" "$opt"
+ else
+ printf " %s" "$opt"
+ done
+ echo
+ fi
fi
if [[ -v targets ]]; then
echo "mountpoints: ${mountpoints[*]}"
-
-
# pull_reexec stops us from getting into an infinite loop if there is some
# kind of weird problem
pulla=false