mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
This prevents the config and the user collection from being backed up by snapd on update. If the user reverts qelectrotech, the current collection will thus not be overwritten by the possibly outdated backup. Add a migration script that automatically transfers the user's .qet directory to the new location.
17 lines
387 B
Bash
Executable File
17 lines
387 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# migrate .qet directory from SNAP_USER_DATA to SNAP_USER_COMMON
|
|
from="$SNAP_USER_DATA/.qet"
|
|
to="$SNAP_USER_COMMON/.qet"
|
|
if [ ! -d "$to" ] && [ -d "$from" ]; then
|
|
echo "Migrating user data from $from to $to"
|
|
mkdir "$to"
|
|
cp -av "$from/." "$to"
|
|
fi
|
|
|
|
# link DXFtoQET so that QET finds it
|
|
mkdir -p "$HOME/.qet"
|
|
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
|
|
|
|
exec "${@}"
|