From 025a8c59536222b2d9306d66286831c737ffce29 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 20 Dec 2019 20:36:50 -0700 Subject: extract function to apply patch --- patch.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/patch.sh b/patch.sh index ac71b1f..6082972 100644 --- a/patch.sh +++ b/patch.sh @@ -1,11 +1,17 @@ #!/bin/sh -wget https://st.suckless.org/patches/font2/st-font2-20190416-ba72400.diff -wget https://st.suckless.org/patches/boxdraw/st-boxdraw_v2-0.8.2.diff -wget https://st.suckless.org/patches/newterm/st-newterm-0.8.2.diff -wget https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff -wget https://st.suckless.org/patches/desktopentry/st-desktopentry-0.8.2.diff -wget https://st.suckless.org/patches/clipboard/st-clipboard-20180309-c5ba9c0.diff +apply_patch() { + url=$1 + wget "$url" + file="$(basename "$url")" + git apply "$file" + rm "$file" +} -git apply ./*.diff -rm ./*.diff +apply_patch https://st.suckless.org/patches/font2/st-font2-20190416-ba72400.diff +apply_patch https://st.suckless.org/patches/boxdraw/st-boxdraw_v2-0.8.2.diff +apply_patch https://st.suckless.org/patches/newterm/st-newterm-0.8.2.diff +apply_patch https://st.suckless.org/patches/nordtheme/st-nordtheme-0.8.2.diff +apply_patch https://st.suckless.org/patches/desktopentry/st-desktopentry-0.8.2.diff +apply_patch https://st.suckless.org/patches/clipboard/st-clipboard-20180309-c5ba9c0.diff +#apply_patch https://gist.githubusercontent.com/mokhan/62bba469937d0114778af4e08ab5f53b/raw/f386b4f738585e90564e457c9795a681333b54e8/st-exec-tmux.diff -- cgit v1.2.3