mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix!: refactored homeModules
This commit is contained in:
parent
1c48edddf4
commit
e9f8ccd2b3
50 changed files with 14 additions and 41 deletions
13
nix/homeModules/common/fish/functions/clone_to_repos.fish
Normal file
13
nix/homeModules/common/fish/functions/clone_to_repos.fish
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function clone_to_repos
|
||||
|
||||
if not count $argv >/dev/null
|
||||
echo "Git url needed"
|
||||
end
|
||||
|
||||
set name_repo (echo $argv | sed -E 's/.*[:\\/]([^\\/]+)\\/([^\\/]+?)(:?\\.git)$/\1 \2/')
|
||||
set name (echo $name_repo | cut -d ' ' -f1)
|
||||
set repo (echo $name_repo | cut -d ' ' -f2)
|
||||
mkdir -p $REPOS_PATH/$name
|
||||
git clone $argv $REPOS_PATH/$name/$repo
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue