A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
20
ARG VERSION22
COPY ./build ./build23
RUN ./build mode=prod23
RUN ./build --mode=prod25
CMD ["./target/release/verbal"]
3
declare -A config4
config=(5
["mode"]="dev"6
["twc-local"]=false7
["twc-watch"]=false5
["--mode"]="dev"6
["--tw-local"]=false7
["--tw-watch"]=false8
)10
while read argument; do
13
continue14
fi15
value=$(echo "$argument" | awk '{st = index($0, "="); print substr($0, st + 1)}')16
if [[ "$value" == "$key" ]]; then17
value="true"18
fi19
config["$key"]=$value20
done <<< $(echo "$@" | tr " " "\n")
29
printf "\n"30
}29
MODE="${config["mode"]}"32
MODE="${config["--mode"]}"34
if [[ "$MODE" != "dev" ]] && [[ "$MODE" != "prod" ]]; then35
echo "[ERROR] invalid mode '$MODE'!"
91
print "create" "$FONT_DIR/"92
mkdir -p "$FONT_DIR"91
TWC_LOCAL="${config["twc-local"]}"94
TW_LOCAL="${config["--tw-local"]}"96
# tailwindcss94
if [[ "$TWC_LOCAL" == "false" ]]; then97
if [[ "$TW_LOCAL" == "false" ]]; then98
print "download" "tailwindcss"99
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -o "$DIST_DIR/tailwindcss"100
chmod +x "$DIST_DIR/tailwindcss"
128
section "BUILD"127
TWC_BIN="$DIST_DIR/tailwindcss"128
TWC_WATCH="${config["twc-watch"]}"130
TW_BIN="$DIST_DIR/tailwindcss"131
TW_WATCH="${config["--tw-watch"]}"130
if [[ "$TWC_LOCAL" == "true" ]] || [[ "$TWC_LOCAL" == "twc-local" ]]; then131
TWC_BIN="tailwindcss"133
if [[ "$TW_LOCAL" == "true" ]]; then134
TW_BIN="tailwindcss"135
fi134
if [[ "$TWC_WATCH" == "true" ]] || [[ "$TWC_WATCH" == "twc-watch" ]]; then137
if [[ "$TW_WATCH" == "true" ]]; then138
print "watch" "tailwindcss"139
WATCH_FLAG="--watch"140
else141
print "build" "tailwindcss"142
fi141
"$TWC_BIN" -c tailwind.config.js -i "$DIST_DIR/www/asset/css/input.css" -o "$DIST_DIR/www/asset/css/output.css" --minify "$WATCH_FLAG"144
"$TW_BIN" -c tailwind.config.js -i "$DIST_DIR/www/asset/css/input.css" -o "$DIST_DIR/www/asset/css/output.css" --minify "$WATCH_FLAG"146
STATUS="$?"