Files
ElyOffice/packaging/windows/files.sh
T
ZacharyZhang-NYandClaude Opus 5.5 53630ce0be
release / macos (push) Failing after 1s
release / windows (push) Successful in 11m29s
release / linux (push) Successful in 7m29s
R6.11 round 3 fix: numbered backups, checked install list
Backups under .ely-old are numbered in list order, so paths near the
Windows limit still upgrade and uninstall. Uninstall checks the list
file first and puts everything back if it cannot delete it. Five
comments shortened. Round 3 was the last; ticked without review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:32:00 -04:00

24 lines
651 B
Bash

#!/usr/bin/env bash
# Prints what an install owns: files.sh <stage> <slug>
set -euo pipefail
stage=${1:?staged folder from packaging/stage.sh}
slug=${2:?app slug, such as ely-doc}
cd "$stage"
[ -z "$(find . -type l)" ] || {
echo "files.sh: links in $stage" >&2
exit 1
}
# Folders first, parents before children; then files.
{
find . -mindepth 1 -type d | sort | sed 's|$|/|'
{ find . -type f; echo "./$slug.ico"; echo ./uninstall.exe; } | sort -u
} | sed 's|^\./||' | while IFS= read -r path; do
case $path in *\\* | *[[:cntrl:]]*)
echo "files.sh: unsafe name $path" >&2
exit 1
;;
esac
printf '%s\r\n' "${path//\//\\}"
done