summaryrefslogtreecommitdiff
path: root/makest
blob: e4a1ea35409ebdc484dd6bacbb3dbb88f0820d6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env zsh
set -x -e
ST_REPO=https://git.suckless.org/st
ST_SRC=$PWD/st
ST_CFG=$PWD/config.h
PATCHLIST=(
    st-disable-intensity-styles.patch
)
MAKE_OPTS=(
    PREFIX=$HOME/.local
)

if [[ ! -r $ST_SRC/.git/config ]]; then
    git clone $ST_REPO $ST_SRC
    cd $ST_SRC
else
    cd $ST_SRC
    git reset --hard
    git clean -fd
    git pull
fi

cp $ST_CFG .

for patch in $PATCHLIST; do
    patch --no-backup-if-mismatch -p1 -i ../$patch
done

make $MAKE_OPTS ${*:-install}