Public release release-b8454b34d38c
Source commit: b8454b34d38cc2ba0bd278e842060db45d091e1c Public tree identity: sha256:69d6c8143bf6227e1bb07852aa94e8af9c26793eca252bb46788894f728cb6d2
This commit is contained in:
commit
d2e84229c5
221 changed files with 80960 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