dotfiles v.1
This commit is contained in:
@@ -374,14 +374,6 @@ function dotfiles_repo -d "Show or set the remote repository URL"
|
||||
end
|
||||
end
|
||||
|
||||
# Load persisted repo URL into the environment on shell start.
|
||||
# This runs when the function file is sourced, so it's evaluated once per
|
||||
# session (before the first `dotfiles` invocation).
|
||||
set -l repo_file "$DOTFILES_BACKUP_DIR/.repo_url"
|
||||
if test -f "$repo_file"
|
||||
set -gx DOTFILES_REPO_URL (command cat "$repo_file")
|
||||
end
|
||||
|
||||
# Ensure there's always a default branch and dotfiles directory, even if
|
||||
# config.fish hasn't been reloaded after a framework update.
|
||||
if not set -q DOTFILES_REPO_BRANCH
|
||||
@@ -390,6 +382,20 @@ end
|
||||
if not set -q DOTFILES_DIR
|
||||
set -gx DOTFILES_DIR "$__fish_config_dir/dotfiles"
|
||||
end
|
||||
if not set -q DOTFILES_BACKUP_DIR
|
||||
set -gx DOTFILES_BACKUP_DIR "$__fish_config_dir/backups"
|
||||
end
|
||||
if not set -q DOTFILES_REPO_URL
|
||||
set -gx DOTFILES_REPO_URL "git@gitssh.toomuchtaco.net:taco/dots.git"
|
||||
end
|
||||
|
||||
# Load persisted repo URL into the environment on shell start.
|
||||
# This runs when the function file is sourced, so it's evaluated once per
|
||||
# session (before the first `dotfiles` invocation).
|
||||
set -l repo_file "$DOTFILES_BACKUP_DIR/.repo_url"
|
||||
if test -f "$repo_file"
|
||||
set -gx DOTFILES_REPO_URL (command cat "$repo_file")
|
||||
end
|
||||
|
||||
|
||||
# ══════════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user