forked from CodelyTV/dotly
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Now is different Sloth symlinks and user symlinks * dot symlinks update use new dotbot.sh library to apply symlinks * Fixed missing paths for gnutools in init-sloth.sh * Fixed dot package add loop when try to install docpars or cargo packages * Fixed no backup when installing Sloth (see CodelyTV#76) * Added libraries (dotbot.sh and symlinks.sh) to parse dotbot yaml files in symlinks context * Added python-yq recipe and dependency on dot core install * Added some options for dot symlinks apply see --help * Added function readarray in array.sh for those who are not running bash greather than version 4 * Changed mapfile for readarray in all scripts and libraries * Added files::backup_move_if_path_exists in files.sh * Added files::fzf that helps including Dotly/.Sloth core libraries and any other libraries in fzf --preview option
- Loading branch information
Showing
35 changed files
with
1,051 additions
and
76 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
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
json::to_yaml() { | ||
if [[ -t 0 ]]; then | ||
[[ -f "${1:-}" ]] && yq --yaml-output < "$1" | ||
else | ||
yq --yaml-output < /dev/stdin | ||
fi | ||
} | ||
|
||
json::is_valid() { | ||
if [[ -t 0 ]]; then | ||
[[ -n "${1:-}" && -f "$1" ]] && jq -e '.' < "$1" &> /dev/null | ||
else | ||
jq -e '.' < /dev/stdin &> /dev/null | ||
fi | ||
} |
Oops, something went wrong.