summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2019-12-20 20:36:50 -0700
committermo khan <mo.khan@gmail.com>2020-02-06 10:37:39 -0700
commit025a8c59536222b2d9306d66286831c737ffce29 (patch)
treed6b4b2c392ccce00779da5170e12da93965e0afc
parent7982ade983ec8ebd402b84bfb035b94812b4e1f3 (diff)
extract function to apply patch
-rw-r--r--patch.sh22
1 files 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