Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
executable file 18 lines (14 sloc) 485 Bytes
#!/usr/bin/env bash
[[ ! -z "$SUDO_USER" ]] && user=$SUDO_USER || user=$LOGNAME
DATA_PATH=${1:-/opt/cathook/data}
if ! [ -d "$DATA_PATH" ]; then
echo "Creating cathook data directory at $DATA_PATH"
mkdir -p "$DATA_PATH"
chown -R $user "$DATA_PATH"
chmod -R 774 "$DATA_PATH"
fi
echo "Installing cathook data to $DATA_PATH"
rsync -avh "data/" "$DATA_PATH"
rsync -avh --ignore-existing "config_data/" "$DATA_PATH"
chown -R $user "$DATA_PATH"
chmod -R 774 "$DATA_PATH"