Skip to content

Instantly share code, notes, and snippets.

@drahosistvan
Created December 11, 2016 13:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drahosistvan/2472c9ab2f618a5119104076b1d4164c to your computer and use it in GitHub Desktop.
Save drahosistvan/2472c9ab2f618a5119104076b1d4164c to your computer and use it in GitHub Desktop.
Modify the download folder in Viber for OSX
#!/bin/bash
if [ -z "$1" ]
then
echo "Please specify a folder"
exit
fi
if [ -z "$2" ]
then
FOLDER="$(/usr/bin/sqlite3 ~/Library/Application\ Support/ViberPC/config.db 'SELECT id FROM accounts LIMIT 1')"
else
FOLDER=$2
fi
TARGET=$1
/usr/bin/sqlite3 ~/Library/Application\ Support/ViberPC/${FOLDER}/viber.db "UPDATE Settings SET SettingValue='${TARGET}' WHERE SettingTitle='DownloadFolder'"
echo "Folder modified please test it."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment