Public release release-e570b80c3a0f
Source commit: e570b80c3a0f4b152a9aa0e7bb8635b3eebcec27 Public tree identity: sha256:cff3388143eb2e9476804cfa1c1246e3a46d485d8aef90f2cdd4df45f2b69abf
This commit is contained in:
commit
0cf66aaa65
210 changed files with 78651 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