mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
292ef7ea8a
Former-commit-id: 89636040fe653a0e2917a51fd7e557b0a9d2436c [formerly b052d724fe2381766bfd225d451cc7a077f82db4] [formerly e9e6f9066892058cf2780d33db8e561281bb1597 [formerly 2592c5eb43
]]
Former-commit-id: d29d1a3284e7e84c80324d7591623644e5c3fac9 [formerly 3417ad7fe90ed523a0bc9bd67beafbb7b7ff3a80]
Former-commit-id: 5ac4f1ea442c54a401c66203343fa0373b5ffa9c
42 lines
891 B
Bash
Executable File
42 lines
891 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
if [ "$USE_DOCKER" != "" ]; then
|
|
if [ -d "frontend/dist" ]; then
|
|
rm -rf frontend/dist
|
|
fi;
|
|
|
|
if [ "$WDIR" = "" ]; then
|
|
WDIR="/go/src/github.com/filebrowser/filebrowser"
|
|
fi;
|
|
|
|
$(command -v winpty) docker run -it \
|
|
--name filebrowser-tmp \
|
|
-v /$(pwd):/src:z \
|
|
-w /${WDIR} \
|
|
filebrowser/dev \
|
|
sh -c "\
|
|
cp -r //src/* /$WDIR && \
|
|
cd build && \
|
|
dos2unix build_assets.sh && \
|
|
dos2unix build.sh && \
|
|
./build_assets.sh && \
|
|
./build.sh \
|
|
"
|
|
exitcode=$?
|
|
|
|
if [ $exitcode -eq 0 ]; then
|
|
for d in "dist/" "node_modules/"; do
|
|
docker cp filebrowser-tmp:/$WDIR/frontend/$d frontend
|
|
done
|
|
for d in "vendor/" "rice-box.go" "filebrowser"; do
|
|
docker cp filebrowser-tmp:/$WDIR/$d ./
|
|
done
|
|
fi
|
|
docker rm -f filebrowser-tmp
|
|
else
|
|
./build/build_assets.sh
|
|
./build/build.sh
|
|
fi
|