mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
cea4d2aae9
Former-commit-id: a4de4d83ab964c11bb0375a66af7b011f39990bc [formerly e93bcfd8f83c089d72245ffa79785860f00b3758] [formerly 364f472f6e27004dab8bffa8674c855e9e6d4213 [formerly ac3ad47a92
]]
Former-commit-id: 4c8cebdea67e8cd88c58563702489f7549aaa222 [formerly 1d6a75e82822a33f8edde2d64077196454f460ed]
Former-commit-id: 4230de67e7923ef7450385c8c9d25654f19f18c7
46 lines
946 B
Bash
Executable File
46 lines
946 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
if [ -d "rice-box.go" ]; then
|
|
rm -rf rice-box.go
|
|
fi
|
|
|
|
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
|