-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-license-file.sh
More file actions
executable file
·64 lines (52 loc) · 2.53 KB
/
Copy pathfix-license-file.sh
File metadata and controls
executable file
·64 lines (52 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
# SPDX-License-Identifier: MPL-2.0
#
# fix-license-file.sh — Auto-create LICENSE with MPL-2.0 text
#
# DISABLED 2026-06-02 per owner directive on licence policy.
# See `feedback_no_automated_licence_edits.md` and
# `feedback_estate_license_policy_umbrella.md`. Licence remediation is
# manual, file-by-file, owner-only. Triggered by neurophone#99 (auto-PR
# reverting PMPL → MPL-2.0 across ~140 files, closed by owner).
#
# Category: LicenseCompliance
# Usage: fix-license-file.sh <repo-path> <finding-json>
#
# Idempotent: exits 0 if any license file already exists.
# Does NOT commit — dispatch-runner handles that.
set -euo pipefail
echo "REFUSED: fix-license-file.sh is disabled per estate policy 2026-06-02." >&2
echo " Licence/SPDX edits MUST be manual, per-file, owner-approved." >&2
echo " See feedback_no_automated_licence_edits.md." >&2
exit 1
REPO_PATH="${1:?Usage: fix-license-file.sh <repo-path> <finding-json>}"
FINDING_JSON="${2:?Usage: fix-license-file.sh <repo-path> <finding-json>}"
# --- Idempotency check ---
for candidate in LICENSE LICENSE.txt LICENSE.md COPYING; do
if [[ -f "${REPO_PATH}/${candidate}" ]]; then
echo "[fix-license-file] ${candidate} already exists — skipping."
exit 0
fi
done
# --- Create LICENSE ---
cat > "${REPO_PATH}/LICENSE" <<'LICENSETEXT'
Palimpsest License (MPL-2.0)
Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
Permission is hereby granted to any person obtaining a copy of this software
and associated documentation files (the "Software"), to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software,
subject to the following conditions:
1. The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
2. Modified versions must be clearly marked as such, and must not be
misrepresented as being the original software.
3. This license text may not be removed or altered from any distribution.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
LICENSETEXT
echo "[fix-license-file] Created LICENSE with MPL-2.0 text."