Fix deployment: No more symlinks in dist.
This commit is contained in:
parent
5e8bd35bf1
commit
73ef6ac422
3 changed files with 30 additions and 3 deletions
27
bin/dist-fix-symlinks.sh
Executable file
27
bin/dist-fix-symlinks.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
|
||||
echo "Fixing symlinks in dist:"
|
||||
|
||||
if [[ ! -d "dist" ]]; then
|
||||
echo " Error: Directory dist does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd dist
|
||||
|
||||
find . -type l | while read symlink; do
|
||||
target=$(readlink -e "$symlink")
|
||||
if [[ -z "$target" ]] || [[ ! -f "$target" ]]; then
|
||||
echo " Could not resolve symlink in dist: $symlink"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " $symlink"
|
||||
rsync "$target" "$symlink" -az --copy-links
|
||||
done
|
||||
|
||||
echo "Done"
|
Loading…
Add table
Add a link
Reference in a new issue