From f4e637b2afaaeb9642345f2d8c57ab001d79f3fb Mon Sep 17 00:00:00 2001 From: Mike Lee Williams Date: Sun, 14 Mar 2021 21:21:14 -0700 Subject: [PATCH] Document -g option Document feature added in #30 --- README.md | 9 +++++---- stowsh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 95afb98..a753029 100644 --- a/README.md +++ b/README.md @@ -56,19 +56,20 @@ directory, creating subdirectories as necessary. ```bash $ stowsh -h -Usage: stowsh [-D] [-n] [-s] [-v[v]] [-t TARGET] PACKAGES... +Usage: stowsh [-D] [-n] [-s] [-g] [-v[v]] [-t TARGET] PACKAGES... ``` `TARGET` is the destination directory (current directory by default). - - `-D` uninstall a package + - `-D` uninstall package(s) - `-n` dry-run (print what would happen, but don't do anything) - `-v` verbose (`-vv` is even more verbose) + - `-g` ignore files that are not tracked by git (uses `git ls-files`) - `-s` skip (skip errors rather than abort) When installing a package `stowsh` will never overwrite existing files. When -unsintalling a package `stowsh` will never delete files that are not symlinks -to the expected place in the package. +unsintalling a package `stowsh` will never delete files that are not symlinks to +the expected place in the package. By default `stowsh` will abort without making _any_ changes if either of these errors occurs. This is done to avoid being left with a broken half installed diff --git a/stowsh b/stowsh index ea914d3..a54f184 100755 --- a/stowsh +++ b/stowsh @@ -125,7 +125,7 @@ stowsh_uninstall() { } stowsh_help() { - echo "Usage: $0 [-D] [-n] [-s] [-v[v]] [-t TARGET] PACKAGES..." + echo "Usage: $0 [-D] [-n] [-s] [-g] [-v[v]] [-t TARGET] PACKAGES..." } if [ "$0" = "$BASH_SOURCE" ]; then