aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--scripts/migration/migrate-windows.ps153
2 files changed, 57 insertions, 0 deletions
diff --git a/README.md b/README.md
index fbcbbbf45..e9eb67498 100644
--- a/README.md
+++ b/README.md
@@ -48,6 +48,10 @@ Assets made available via [GitHub releases](https://github.com/ferdium/ferdium-a
48 48
49_Find answers to frequently asked questions on [ferdium.org/faq](https://ferdium.org/faq/)._ 49_Find answers to frequently asked questions on [ferdium.org/faq](https://ferdium.org/faq/)._
50 50
51## Migrating from Ferdi
52
53If you are a pre-existing user of Ferdi, and are thinking of switching to Ferdium, you might want to run [the following script](./scripts/migration/migrate-windows.ps1) to migrate your existing Ferdi profile such that Ferdium can pick up the configurations.
54
51## Contributing 55## Contributing
52 56
53Please read the [contributing guidelines](CONTRIBUTING.md) to setup your development machine and proceed. 57Please read the [contributing guidelines](CONTRIBUTING.md) to setup your development machine and proceed.
diff --git a/scripts/migration/migrate-windows.ps1 b/scripts/migration/migrate-windows.ps1
new file mode 100644
index 000000000..a7e67b94a
--- /dev/null
+++ b/scripts/migration/migrate-windows.ps1
@@ -0,0 +1,53 @@
1Write-Host "********************************************"
2Write-Host " Ferdium User Data Migration Tool "
3Write-Host " WARNING: Windows OS Only! "
4Write-Host "********************************************"
5Write-Host ""
6Write-Host ""
7Write-Host "This tool migrates your user data from Ferdi to Ferdium."
8Write-Host ""
9Write-Host ""
10$confirmation = Read-host "Do you want to proceed? (Y/N)"
11
12Switch($confirmation)
13{
14 default {exit 1}
15 "No" {exit 1}
16 "N" {exit 1}
17 "Yes" {Write-Host "Starting..."}
18 "Y" {Write-Host "Starting..."}
19}
20
21
22$FERDI_PATH=$env:APPDATA + "/Ferdi"
23$FERDIUM_PATH=$env:APPDATA + "/Ferdium"
24
25try {
26 Rename-Item -Force -Path $FERDI_PATH -NewName Ferdium -ErrorAction 'Stop'
27} catch {
28 Write-Host ""
29 Write-Host "ERROR!"
30 Write-Host "No user data was found. Exiting..."
31 exit 1
32}
33
34if (-not (Test-Path -Path $FERDIUM_PATH/server.sqlite)) {
35 Write-Host ""
36 Write-Host "********************************************"
37 Write-Host ""
38 Write-Host "WARNING: Your data was partially migrated!"
39 Write-Host ""
40 Write-Host "It was detected that your account is using Ferdi servers to sync your data."
41 Write-Host "Please, check this guide on how to export and import your data manually:"
42 Write-Host "https://github.com/ferdium/ferdi/blob/main/MIGRATION.md"
43 Write-Host ""
44 Write-Host "********************************************"
45
46} else {
47 Write-Host ""
48 Write-Host ""
49 Write-Host "********************************************"
50 Write-Host " Success! "
51 Write-Host "********************************************"
52}
53