aboutsummaryrefslogtreecommitdiffstats
path: root/combine.sh
blob: 688d3c16926d457bb57d371e88a5ecbadc208c83 (plain) (blame)
1
2
3
4
5
6
7
#!/bin/bash

contents="$(cat slack/globals.py slack/log.py slack/util.py slack/task.py slack/http.py slack/api.py slack/config.py slack/main.py slack.py | grep -Ev '^from (\.|slack)' | sed 's/G\.//')"

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