Skip to content

Instantly share code, notes, and snippets.

@justlaputa
Created December 24, 2016 19:52
Show Gist options
  • Save justlaputa/35319afcfa6e6cffb0579c17a115057a to your computer and use it in GitHub Desktop.
Save justlaputa/35319afcfa6e6cffb0579c17a115057a to your computer and use it in GitHub Desktop.
#!/bin/sh
mkdir -p $HOME/.config/resilio-sync
BTSYNC_STORAGE=$HOME/.config/btsync/storage
RESILIO_STORAGE=$HOME/.config/resilio-sync/storage
CONFIG_PATH=$HOME/.config/resilio-sync/config.json
if [ -d ${BTSYNC_STORAGE} ] && [ ! -d ${RESILIO_STORAGE} ]; then
# Copy btsync storage folder
cp -r ${BTSYNC_STORAGE} ${RESILIO_STORAGE}
else
mkdir -p ${RESILIO_STORAGE}
fi
if [ ! -f ${CONFIG_PATH} ]; then
sed -e "s|{HOME}|$HOME|g" /etc/resilio-sync/user_config.json > ${CONFIG_PATH}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment