dotfiles v1.0.2
This commit is contained in:
@@ -514,15 +514,19 @@ function dotfiles_publish -d "Push local changes to the remote dotfiles repo"
|
||||
|
||||
# ── Step 3: Copy local state into the clone ───────────────────────────
|
||||
# These are the files and directories that make up the dotfiles repo.
|
||||
set -l local_config "$__fish_config_dir/config.fish"
|
||||
set -l local_funcs "$__fish_config_dir/functions/"
|
||||
set -l local_tmpl "$DOTFILES_DIR/"
|
||||
set -l local_confd "$__fish_config_dir/conf.d/"
|
||||
set -l local_config "$__fish_config_dir/config.fish"
|
||||
set -l local_funcs "$__fish_config_dir/functions/"
|
||||
set -l local_tmpl "$DOTFILES_DIR/"
|
||||
set -l local_confd "$__fish_config_dir/conf.d/"
|
||||
set -l local_install "$__fish_config_dir/install.fish"
|
||||
set -l local_readme "$__fish_config_dir/README.md"
|
||||
|
||||
set -l repo_config "$tmpdir/.config/fish/config.fish"
|
||||
set -l repo_funcs "$tmpdir/.config/fish/functions/"
|
||||
set -l repo_tmpl "$tmpdir/.config/fish/dotfiles/"
|
||||
set -l repo_confd "$tmpdir/.config/fish/conf.d/"
|
||||
set -l repo_config "$tmpdir/.config/fish/config.fish"
|
||||
set -l repo_funcs "$tmpdir/.config/fish/functions/"
|
||||
set -l repo_tmpl "$tmpdir/.config/fish/dotfiles/"
|
||||
set -l repo_confd "$tmpdir/.config/fish/conf.d/"
|
||||
set -l repo_install "$tmpdir/install.fish"
|
||||
set -l repo_readme "$tmpdir/README.md"
|
||||
|
||||
# Ensure target directories exist
|
||||
for d in (dirname "$repo_config") "$repo_funcs" "$repo_tmpl" "$repo_confd"
|
||||
@@ -539,6 +543,18 @@ function dotfiles_publish -d "Push local changes to the remote dotfiles repo"
|
||||
echo " dotfiles/"
|
||||
command cp -r "$local_confd." "$repo_confd"
|
||||
echo " conf.d/"
|
||||
if test -f "$local_install"
|
||||
command cp "$local_install" "$repo_install"
|
||||
echo " install.fish"
|
||||
else
|
||||
echo " (no install.fish)"
|
||||
end
|
||||
if test -f "$local_readme"
|
||||
command cp "$local_readme" "$repo_readme"
|
||||
echo " README.md"
|
||||
else
|
||||
echo " (no README.md)"
|
||||
end
|
||||
|
||||
# ── Step 4: Prompt for version ─────────────────────────────────────────
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user