Public release release-be1f654ae8de
Source commit: be1f654ae8de7d5eeb2005b4e1a05bf1ebf3124f Public tree identity: sha256:ab53679496be4be7d1e02bc00723072774d1a3f87e10cc56558a752f28f6abb1
This commit is contained in:
commit
a6ca9e26dd
210 changed files with 78671 additions and 0 deletions
22
scripts/migrate-clusterflux-state.sh
Executable file
22
scripts/migrate-clusterflux-state.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
migrate_path() {
|
||||
local source="$1"
|
||||
local destination="$2"
|
||||
if [[ ! -e "$source" ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ -e "$destination" ]]; then
|
||||
printf 'refusing to overwrite existing destination: %s\n' "$destination" >&2
|
||||
exit 1
|
||||
fi
|
||||
mv -- "$source" "$destination"
|
||||
printf 'migrated %s -> %s\n' "$source" "$destination"
|
||||
}
|
||||
|
||||
migrate_path "${HOME}/.disasmer" "${HOME}/.clusterflux"
|
||||
migrate_path "${XDG_CONFIG_HOME:-${HOME}/.config}/disasmer" \
|
||||
"${XDG_CONFIG_HOME:-${HOME}/.config}/clusterflux"
|
||||
migrate_path "${PWD}/.disasmer" "${PWD}/.clusterflux"
|
||||
migrate_path "${PWD}/disasmer.toml" "${PWD}/clusterflux.toml"
|
||||
Loading…
Add table
Add a link
Reference in a new issue