forked from thoughtbot/rcm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow user to specify the target directory
A new default target can be set using: * A target option in rcrc(5) * -T flag (based on the work in thoughtbot#255) for thoughtbot#246
- Loading branch information
jonathan 'jonthn' buschmann
committed
May 7, 2023
1 parent
ef34b0b
commit ae7cafd
Showing
14 changed files
with
102 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
rcm (@PACKAGE_VERSION@) unstable; urgency=low | ||
|
||
* Feature: rcup/rcdn hooks can bail early (Patrick Brisbin) | ||
* Feature: specify a target directory instead of $HOME (see -T or TARGET setting .rcrc(5)) | ||
* Documentation improvement (Teo Ljungberg) | ||
|
||
-- Mike Burns <[email protected]> Fri, 30 Dec 2022 11:43:00 -0500 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,4 +189,5 @@ append_variable() { | |
|
||
if [ -r "$RCRC" ]; then | ||
. "$RCRC" | ||
DEST_DIR="${TARGET:-$DEST_DIR}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
$ . "$TESTDIR/helper.sh" | ||
|
||
The target for rcup should be specifiable in .rcrc and expand variables | ||
|
||
$ touch .dotfiles/example | ||
> mkdir "$HOME/target-rcrc" | ||
|
||
$ echo 'TARGET=$HOME/target-rcrc' > $HOME/.rcrc | ||
|
||
$ rcup -v > /dev/null | ||
|
||
$ assert_linked "$HOME/target-rcrc/.example" "$HOME/.dotfiles/example" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$ . "$TESTDIR/helper.sh" | ||
|
||
Should be able to modify the global dotfiles target using a command line argument, | ||
with environment variables within being expanded | ||
|
||
$ touch .dotfiles/example | ||
> mkdir "$HOME/target" | ||
|
||
$ rcup -v -T '$HOME/target' > /dev/null | ||
|
||
$ assert_linked "$HOME/target/.example" "$HOME/.dotfiles/example" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$ . "$TESTDIR/helper.sh" | ||
|
||
Should be able to modify the global dotfiles target using a command line argument | ||
|
||
$ touch .dotfiles/example | ||
> mkdir "$HOME/target" | ||
|
||
$ rcup -v -T "$HOME/target" > /dev/null | ||
|
||
$ assert_linked "$HOME/target/.example" "$HOME/.dotfiles/example" |