diff --git a/scripts/start-backup b/scripts/start-backup new file mode 100755 index 000000000..f42bf6e7a --- /dev/null +++ b/scripts/start-backup @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ "$BACKUP" == "" ]]; then + echo "BACKUP environment variable is required" + exit 1 +fi + +if [[ "$PROFILE" == "" ]]; then + echo "PROFILE environment variable is required" + exit 1 +fi + +backupPath="$HOME/Library/Application Support/Signal-$BACKUP" +profilePath="$HOME/Library/Application Support/Signal-$PROFILE" + +rm -rf "$profilePath" && \ + cp -R "$backupPath" "$profilePath" && \ + NODE_APP_INSTANCE="$PROFILE" yarn start