Skip to content

Commit

Permalink
Reorganize into tools, add scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Neved4 committed Dec 11, 2023
1 parent 0c59380 commit 42f0100
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Fast, CLI world clock that displays time zone information using
[tz database] to read valid [tz entries].

```console
$ twc -h -f tz-small.conf
$ twc -h -f tools/samples/tz-small.conf
America/New York 2023-12-10 16:39:43 -0500
America/Los Angeles 2023-12-10 13:39:43 -0800
UTC 2023-12-10 21:39:43 +0000
Expand Down
7 changes: 7 additions & 0 deletions tools/bench-date.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

sed '/^\s*#/d' tools/samples.tz |
while IFS= read -r l
do
TZ=$l date
done
19 changes: 19 additions & 0 deletions tools/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

version=1.1.0
export CFLAGS=-O2

clang -arch arm64 -o twc twc.c
tar -czvf twc-$version-arm64-apple-darwin.tar.gz twc

clang -arch x86_64 -o twc twc.c
tar -czvf twc-$version-x86_64-apple-darwin.tar.gz twc

docker build -t twc .
docker run --name dist twc
docker cp dist:/app/twc .
docker stop dist
docker rm dist
tar -czvf twc-$version-arm64-linux-debian.tar.gz twc

# docker run --name dist --rm twc
File renamed without changes.
File renamed without changes.

0 comments on commit 42f0100

Please sign in to comment.