aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-04 23:18:30 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-04 23:18:30 +0300
commit97387d8e76d4874724b4eb0d621b0ef103486a01 (patch)
tree73fb8ce2878a084f924825338b88ec6d47fbefe1
parentrefactoring (diff)
downloadconfig-links-97387d8e76d4874724b4eb0d621b0ef103486a01.tar.gz
config-links-97387d8e76d4874724b4eb0d621b0ef103486a01.zip
add README
-rw-r--r--README.md46
-rw-r--r--update.sh4
2 files changed, 49 insertions, 1 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..67e46ec
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+Windows configuration files
+===========================
+
+An easy way to store & sync various configuration files across Windows
+installations.
+Requires Cygwin.
+Actual configuration files are stored in this repository in directories which
+names must match the `^%[_[:alpha:]][_[:alnum:]]+%$` regular expression.
+The part between the percent signs is the name of an environment variable.
+Its value replaces the path of this directory, making for the path of a symlink
+which would point to a file in this repository.
+
+Usage
+-----
+
+```
+usage: ./update.sh
+```
+
+For example, here's a possible representation of the "%PROGRAMDATA%" directory:
+
+```
+%PROGRAMDATA%/
+└── a
+ └── b
+ └── c
+ └── test.txt
+```
+
+Running the script above would create a symlink at
+"C:\ProgramData\a\b\c\test.txt" pointing to this repository's
+"%PROGRAMDATA%\a\b\c\test.txt".
+
+Limitations
+-----------
+
+Only alphanumeric variable names are supported.
+For example, the environment variable `ProgramFiles(x86)` is not supported.
+
+License
+-------
+
+Distributed under the MIT License.
+See [LICENSE.txt] for details.
+
+[LICENSE.txt]: LICENSE.txt
diff --git a/update.sh b/update.sh
index 40225dc..d32e254 100644
--- a/update.sh
+++ b/update.sh
@@ -5,7 +5,7 @@
# For details, see https://github.com/egor-tensin/windows-home.
# Distributed under the MIT License.
-# This relies on the availability of native symlinks.
+# This script relies on the availability of native symlinks.
# Those are indeed supported by NTFS, but require Administrator privileges for
# creation.
# It likely won't bother you as long as you don't use the functions defined in
@@ -17,6 +17,8 @@
# `CYGWIN` Windows environment variable value **must** include either
# `winsymlinks:native` or `winsymlinks:nativestrict`!
+# usage: ./update.sh
+
set -o errexit
set -o nounset
set -o pipefail