Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
neko-custom/.m1k1o/build

68 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-06-17 10:32:34 +12:00
#!/bin/sh
2020-06-19 12:38:35 +12:00
cd "$(dirname "$0")"
2020-06-17 10:32:34 +12:00
BASE=../
build_client() {
docker build -t neko-dev-client -f base/Dockerfile --target client "$BASE"
docker run --rm -v "$BASE"/client/dist:/tmp/dist neko-dev-client sh -c "rm -rf /tmp/dist/*; cp -r /src/dist/* /tmp/dist"
}
build_server() {
docker build -t neko-dev-server -f base/Dockerfile --target server "$BASE"
docker run --rm -v "$BASE"/server/bin:/tmp/bin neko-dev-server sh -c "rm -rf /tmp/bin/neko; cp /src/bin/neko /tmp/bin"
}
2021-03-29 22:27:28 +13:00
build_arm_client() {
docker build -t neko-dev-client -f arm_base/Dockerfile --target client "$BASE"
docker run --rm -v "$BASE"/client/dist:/tmp/dist neko-dev-client sh -c "rm -rf /tmp/dist/*; cp -r /src/dist/* /tmp/dist"
}
build_arm_server() {
docker build -t neko-dev-server -f arm_base/Dockerfile --target server "$BASE"
docker run --rm -v "$BASE"/server/bin:/tmp/bin neko-dev-server sh -c "rm -rf /tmp/bin/neko; cp /src/bin/neko /tmp/bin"
}
2020-06-17 10:32:34 +12:00
build_base() {
docker build -t m1k1o/neko:base -f base/Dockerfile "$BASE"
}
2021-03-29 22:27:28 +13:00
build_arm_base() {
docker build -t mbattista/neko:arm_base -f arm_base/Dockerfile "$BASE"
}
2020-06-30 19:45:45 +12:00
build_firefox() {
docker build -t m1k1o/neko:firefox -f firefox/Dockerfile firefox/
}
build_chromium() {
docker build -t m1k1o/neko:chromium -f chromium/Dockerfile chromium/
2020-06-17 10:32:34 +12:00
}
2021-03-29 22:27:28 +13:00
build_arm_firefox() {
docker build -t mbattista/neko:arm_firefox -f arm_firefox/Dockerfile arm_firefox/
}
2021-03-23 04:22:52 +13:00
build_xfce() {
docker build -t m1k1o/neko:xfce -f xfce/Dockerfile xfce/
}
build_vlc() {
docker build -t m1k1o/neko:vlc -f vlc/Dockerfile vlc/
}
2020-06-17 10:32:34 +12:00
case $1 in
client) build_client;;
serve) build_server;;
base) build_base;;
2020-06-30 19:45:45 +12:00
firefox) build_firefox;;
chromium) build_chromium;;
2021-03-23 04:22:52 +13:00
xfce) build_xfce;;
vlc) build_vlc;;
2021-03-29 22:27:28 +13:00
arm_client) build_arm_client;;
arm_server) build_arm_server;;
arm_base) build_arm_base;;
arm_firefox) build_arm_firefox;;
2020-06-17 10:32:34 +12:00
*) echo "Unknown $1";;
esac