Debian Codegraph @

debian/session-migrations/lomiri-wizard-has-run-migration.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`. -euf
2
3 # Copyright (C) 2021 UBports Foundation
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License version 3 as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # Authored by: Ratchanan Srirattanamet <[email protected]>
18
19 OLD_FILE="${HOME}/.config/ubuntu-system-settings/wizard-has-run"
20 NEW_FILE="${HOME}/.config/lomiri/wizard-has-run"
21
22 if [scip-shell system . . `[`. -e "$NEW_FILE" ]; then
23 echoscip-shell system . . echo. "${NEW_FILE} exists. Perhaps the migration has already" \
24 "happened, and/or the user has run the wizard since."
25 exit 0
26 fi
27
28 if [scip-shell system . . `[`. -e "$OLD_FILE" ]; then
29 mkdirscip-shell system . . mkdir. -p "$(dirnamescip-shell system . . dirname. "$NEW_FILE")"
30 cpscip-shell system . . cp. -a "$OLD_FILE" "$NEW_FILE"
31
32 echoscip-shell system . . echo. "Lomiri wizard-has-run file is migrated."
33 fi