bunch of updates and fixes
[distro-setup] / conflink
index bbe13126750cddb64e67a636fefeacc2291021a7..0dffc229e80b1b662c75fc8a0a6098008efebb88 100755 (executable)
--- a/conflink
+++ b/conflink
@@ -2,13 +2,28 @@
 
 source /a/bin/errhandle/err
 
+
+usage() {
+  cat <<EOF
+Usage: ${0##*/} [OPTIONS]
+Link or otherwise install configuration files.
+
+-f   For fast. Dont use lnf, use ln -sf. Good for updating existing files.
+EOF
+  exit $1
+}
+
+
 m() {
   echo "$*"
   "$@"
 }
 s() { sudo "$@"; }
-lnf() { /a/exe/lnf "$@"; }
 
+lnf() { /a/exe/lnf "$@"; }
+if [[ $1 == -f ]]; then
+  lnf() { ln -sf "$@"; }
+fi
 
 shopt -s nullglob
 shopt -s extglob