aboutsummaryrefslogtreecommitdiff
path: root/install.sh
blob: 7023db36de2c6a3abefb23e50a65c5298f519252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

cd "$(dirname "$0")"
sibs build --release
chmod +x ./sibs-build/release/dchat

dchat_resource_dir=~/.local/share/dchat/resources
desktop_file=~/.local/share/applications/dchat.desktop
mkdir -p ~/.local/bin
mkdir -p ~/.local/share/applications
mkdir -p ${dchat_resource_dir}

target_path=~/.local/bin/dchat
cp ./sibs-build/release/dchat $target_path
cp ./dchat.desktop ${desktop_file}
sed -i "s;DCHAT_BIN_PATH;${target_path};g" ${desktop_file}
sed -i "s;DCHAT_RESOURCES_PATH;${dchat_resource_dir};g" ${desktop_file}
cp -r ./shaders "${dchat_resource_dir}/shaders"
cp -r ./fonts "${dchat_resource_dir}/fonts"
echo "Installed dchat to directory $target_path"