Compare commits

..

No commits in common. "abb286ba2ac8364fc92d1af3e107c6e5c276e67c" and "439580c5cfd2cfa83b14d429fe79226ef4a4f40c" have entirely different histories.

2 changed files with 1 additions and 14 deletions

View file

@ -11,12 +11,7 @@ i have an unhealthy relationship with overlayfs. i also like to easily change my
# Usage # Usage
```sh ```sh
configctl [OPTIONS] <changeset_name> [unmount] configctl <changeset> [unmount]
options
-a, --automount automatically enable the changeset service file
-f, --force ovewrite existing service file
-s, --service-path the path to write the service file
``` ```
by default, the configctl expects the base configuration set to exist in `$XDG_DATA_HOME/config/base` (usually `~/.local/share/config/base`) and the changesets to exist in `$XDG_DATA_HOME/config/changeset`. changes while the configuration is mounted will be written to `$XDG_STATE_HOME/config/{<changeset>,.work_<changeset>}` by default, the configctl expects the base configuration set to exist in `$XDG_DATA_HOME/config/base` (usually `~/.local/share/config/base`) and the changesets to exist in `$XDG_DATA_HOME/config/changeset`. changes while the configuration is mounted will be written to `$XDG_STATE_HOME/config/{<changeset>,.work_<changeset>}`

View file

@ -48,23 +48,15 @@ while true; do
-s | --service-path ) SVC_PATH="$2"; shift 2 ;; -s | --service-path ) SVC_PATH="$2"; shift 2 ;;
\? | -\? ) echo "Unknown option: $1"; exit 1 ;; \? | -\? ) echo "Unknown option: $1"; exit 1 ;;
-- ) shift; break ;; -- ) shift; break ;;
-* ) echo "ERROR: Unknown option: '$1'"; exit 1 ;;
* ) break ;; * ) break ;;
esac esac
done done
shift "$(($OPTIND - 1))"
SELECTED="$1" SELECTED="$1"
CHANGESET="$CHANGESET_DIR/$SELECTED" CHANGESET="$CHANGESET_DIR/$SELECTED"
UPPER_DIR="$XDG_STATE_HOME/config/$SELECTED" UPPER_DIR="$XDG_STATE_HOME/config/$SELECTED"
WORKDIR="$XDG_STATE_HOME/config/.work_$SELECTED" WORKDIR="$XDG_STATE_HOME/config/.work_$SELECTED"
if [ -z "$SELECTED" ]; then
usage
exit
fi
if [ ! -d "$CHANGESET" ]; then if [ ! -d "$CHANGESET" ]; then
echo "'$CHANGESET' not found." echo "'$CHANGESET' not found."
exit 1 exit 1