diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-11-19 16:44:37 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 15ec647983d89c57dc920def4aad44d98ff70b23 (patch) | |
tree | 9437bcb26f391d5314eb192142a5fb17c55f6b32 | |
parent | 16268e35abfb4d8e4698229cfe274dd649281726 (diff) | |
download | wee-slack-15ec647983d89c57dc920def4aad44d98ff70b23.tar.gz |
Rename combine.sh to build.sh
Write output to build/slack.py instead of combined.py.
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | build.sh | 7 | ||||
-rwxr-xr-x | combine.sh | 7 |
3 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,4 @@ +/build/ *.pyc .cache/ *.sublime-* diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5fcfbdf --- /dev/null +++ b/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +contents="$(cat slack/*.py main.py | grep -Ev '^from slack[. ]')" + +echo "$contents" | grep '^from __future__' | sort -u > build/slack.py +echo "$contents" | grep -v '^from __future__' | grep -E '^(import|from)' | sort -u >> build/slack.py +echo "$contents" | grep -Ev '^(import|from)' >> build/slack.py diff --git a/combine.sh b/combine.sh deleted file mode 100755 index 53cf7fe..0000000 --- a/combine.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -contents="$(cat slack/*.py slack.py | grep -Ev '^from slack[. ]')" - -echo "$contents" | grep '^from __future__' | sort -u > combined.py -echo "$contents" | grep -v '^from __future__' | grep -E '^(import|from)' | sort -u >> combined.py -echo "$contents" | grep -Ev '^(import|from)' >> combined.py |