Feature/Fix: Move to inside you dotfiles from console#142
Closed
gtrabanco wants to merge 162 commits intoCodelyTV:masterfrom
gtrabanco:feature/move_files_dotbot
Closed
Feature/Fix: Move to inside you dotfiles from console#142gtrabanco wants to merge 162 commits intoCodelyTV:masterfrom gtrabanco:feature/move_files_dotbot
gtrabanco wants to merge 162 commits intoCodelyTV:masterfrom
gtrabanco:feature/move_files_dotbot
Conversation
…res/fixes in other PRs. Added feature of autoupdate dotly
…overflow.com/a/17841619 Removed duplicate functions
…ta branch for testing and developing.
…otly, fixed all the way init-scripts were loaded because they fail. Fixed some issues.
* Added new functions to get the current script_name or script_path where the functions were run * Added function to conver mayus to lower
`mas` has added support for Apple Silicon: mas-cli/mas#310
…led (#107) Co-authored-by: David Asensio Cañas <david.asensio@lifullconnect.com>
In case of having multiple Cargo dependencies installed such as:
```sh
{▸} ~ cargo install --list
docpars v0.2.0:
docpars
git-delta v0.6.0:
delta
```
The previous command was passing out multiple lines:
```sh
{▸} ~ cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' '
docpars
git-delta
```
Because of these lines were being received by the very same `cargo install` command, it was failing:
```sh
{▸} ~ cargo install "$(cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ')"
Updating crates.io index
error: could not find `docpars
git-delta` in registry `https://github.com/rust-lang/crates.io-index` with version `*`
```
Now, it executes the `cargo install` multiple times, but at least do not produce crashes 😅
```sh
{▸} ~ cargo install --list | grep -E '^[a-z0-9_-]+ v[0-9.]+:$' | cut -f1 -d' ' | xargs -n1 cargo install
Updating crates.io index
Ignored package `docpars v0.2.0` is already installed, use --force to override
Updating crates.io index
Ignored package `git-delta v0.6.0` is already installed, use --force to override
```
Having pip3 installed does not imply having defined any dependencies for python. This change avoids crashing while running the `up` command. We were crashing because of the combination of `set -euo pipefail` with an empty input for the `grep -v '^\-e'` 🤟
Added script 'dot symlinks update'
* Fix errors with symlinks update script when files are symbolic links * Fix non alphanumeric names of files
…ates can apply its own symlinks without adding files in symlinks subfolder
…so use it without copying files to the init-scripts folder Added a CHANGELOG
* When you have problems of file permissions of autocompletions or any zsh file you can solve those errors by executing this subcommand.
Merged official dotly master branch in this branch.
- Refactored libraries - Fix paths with spaces fail - Fix yaml file in scripts were not running
Contributor
Author
|
Refactor necessary. I found a bug using paths with spaces. Uncheked tests task. |
- Fixed error getting `brew --prefix` because PATH is not defined yet when we need to get it. - Fixed error in shell/bash/init.sh because xargs did not have the argument -0 (NUL error)
xargs: WARNING: a NUL character occurred in the input. It cannot be passed through in the argument list. Did you mean to use the --null option?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds new functionality to move files inside your dotfiles and apply a symlink "automatically" and preserve those changes inside your dotfiles. New symlink is applied automatically.
Motivation
Makes more simple and faster to move files inside your dotfiles. This also removes the need of modify your conf.yaml file which is easy to make format errors while editing manually without an editor.
Fixes
New core libraries
files.shThis is from PR #129 and it is documented there
files::check_if_path_is_olderfunction is not used in this branch but I expect PR #129 to be approved and keep this file as it is there. It is a consistency decision.dot.shAdded functions to load libraries that is from PR #129 and it is documented there
output.shThis is from PR #129 and it is full documented there
New Features
json.shjson::to_yamlconvert json to yamlyaml.shyaml::to_jsonconvert yaml file to json to manipulate it withjq commandNew commands
All these command use
symlinks/conf.yamlby default if not argument like--yaml=conf.linuxis given. You can also provide a custom path to yaml file like--yaml="/path/to/my.yaml". It should respect the dotbot yaml format. If it is an empty file it will create the necessary directive.See the help for more options of all command because do more stuff all of them.
dot symlinks linkMove a file in your current work directory in your console to the given path inside your DOTFILES_PATH (relative path).
dot symlinks editEdit a current link to a new one and apply it.
dot symlinks deleteDelete a symlink and the stored file.
dot symlinks restoreMove from dotfiles to the link path (destroy the symlink and preserve the file in the deleted link).
Modified commands
dot self installAdded a way to backup files.
dot symlinks applyAdded silent mode.
Other modifications in this feature
Modified how symlinks are applied. Now there are "system" (dotly) symlinks and user symlinks. Stuff that are necessary for dotly to set up as symbolic links are now inside
dot self installcontext folder. This mean thatdotfiles_templatewere modified as well to split symlinks yaml files.Modified self install to install yq.
Modified update_all to update yq.
Tasks
feature/core(only needed parts).dot self install.linksymlinks script.editsymlinks script.deletesymlinks script.restoresymlinks script.yq.yqto update all.About merging this branch
If PR #129 is approved then next files must be discarded:
scripts/core/dot.shscripts/core/files.shscripts/core/output.shBecause probably are more updated in the PR #129