@henols/c64-re-tools 2.1.8 → 2.2.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,8 @@
3
3
  set -Eeuo pipefail
4
4
 
5
5
  # ------------------------------------------------------------
6
- # dxa installer for Debian / Ubuntu
6
+ # dxa installer. install-container.sh runs it as root, with build-essential
7
+ # and curl.
7
8
  #
8
9
  # Installs:
9
10
  # /usr/local/bin/dxa
@@ -59,39 +60,10 @@ trap cleanup EXIT
59
60
 
60
61
 
61
62
  # ------------------------------------------------------------
62
- # Check platform
63
+ # Check user
63
64
  # ------------------------------------------------------------
64
65
 
65
- if [[ ! -f /etc/os-release ]]; then
66
- error "This script is intended for Debian/Ubuntu-style Linux systems."
67
- fi
68
-
69
- # shellcheck disable=SC1091
70
- source /etc/os-release
71
-
72
- case "${ID:-}" in
73
- debian|ubuntu)
74
- ;;
75
- *)
76
- if [[ "${ID_LIKE:-}" != *debian* ]]; then
77
- error "Unsupported distribution: ${ID:-unknown}. This script expects Debian or Ubuntu."
78
- fi
79
- ;;
80
- esac
81
-
82
-
83
- # ------------------------------------------------------------
84
- # Determine sudo command
85
- # ------------------------------------------------------------
86
-
87
- if [[ "$(id -u)" -eq 0 ]]; then
88
- SUDO=""
89
- else
90
- command -v sudo >/dev/null 2>&1 ||
91
- error "sudo is required when the script is not run as root."
92
-
93
- SUDO="sudo"
94
- fi
66
+ [[ "$(id -u)" -eq 0 ]] || error "Run as root."
95
67
 
96
68
 
97
69
  # ------------------------------------------------------------
@@ -112,20 +84,6 @@ It will NOT install xa or xa65.
112
84
  EOF
113
85
 
114
86
 
115
- # ------------------------------------------------------------
116
- # Install build requirements
117
- # ------------------------------------------------------------
118
-
119
- info "Installing build requirements"
120
-
121
- ${SUDO} apt-get update
122
-
123
- ${SUDO} apt-get install -y --no-install-recommends \
124
- build-essential \
125
- ca-certificates \
126
- curl
127
-
128
-
129
87
  # ------------------------------------------------------------
130
88
  # Create temporary build directory
131
89
  # ------------------------------------------------------------
@@ -260,9 +218,9 @@ echo "Compiled dxa binary runs."
260
218
 
261
219
  info "Installing dxa"
262
220
 
263
- ${SUDO} install -d -m 0755 "${BIN_DIR}"
221
+ install -d -m 0755 "${BIN_DIR}"
264
222
 
265
- ${SUDO} install \
223
+ install \
266
224
  -m 0755 \
267
225
  "${DXA_BINARY}" \
268
226
  "${BIN_DIR}/dxa"
@@ -284,15 +242,15 @@ if [[ -n "${DXA_MANPAGE}" ]]; then
284
242
 
285
243
  info "Installing dxa manual page"
286
244
 
287
- ${SUDO} install -d -m 0755 "${MAN_DIR}"
245
+ install -d -m 0755 "${MAN_DIR}"
288
246
 
289
- ${SUDO} install \
247
+ install \
290
248
  -m 0644 \
291
249
  "${DXA_MANPAGE}" \
292
250
  "${MAN_DIR}/dxa.1"
293
251
 
294
252
  if command -v mandb >/dev/null 2>&1; then
295
- ${SUDO} mandb -q || true
253
+ mandb -q || true
296
254
  fi
297
255
  else
298
256
  echo
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bash
2
- # Installs Ghidra in $DEST/ghidra_<version>_PUBLIC (DEST: /opt) and points
3
- # $DEST/ghidra at it, so that C64RT_GHIDRA=$DEST/ghidra stays the same when
4
- # the version changes. Removes the Ghidra versions that it installed before.
5
- # Ghidra needs Java 21. Debian and Ubuntu.
2
+ # Installs Ghidra in /opt/ghidra_<version>_PUBLIC and points /opt/ghidra at
3
+ # it, so that C64RT_GHIDRA=/opt/ghidra stays the same when the version
4
+ # changes. Removes the Ghidra versions that it installed before. Ghidra needs
5
+ # Java 21. install-container.sh runs it as root.
6
6
 
7
7
  set -Eeuo pipefail
8
8
 
@@ -10,7 +10,7 @@ GHIDRA_VERSION="12.1.3"
10
10
  GHIDRA_ZIP="ghidra_${GHIDRA_VERSION}_PUBLIC_20260817.zip"
11
11
  GHIDRA_URL="https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_${GHIDRA_VERSION}_build/${GHIDRA_ZIP}"
12
12
  GHIDRA_SHA256="93a5d11a9ad510622acaaf908c556a7b9b764d338e78a7567f3689bf5081fd54"
13
- DEST="${DEST:-/opt}"
13
+ DEST="/opt"
14
14
  GHIDRA_DIR="${DEST}/ghidra_${GHIDRA_VERSION}_PUBLIC"
15
15
 
16
16
  fail() {
@@ -18,7 +18,7 @@ fail() {
18
18
  exit 1
19
19
  }
20
20
 
21
- [[ "$(id -u)" -eq 0 || -w "${DEST}" ]] || fail "run as root, or set DEST to a folder that you can write."
21
+ [[ "$(id -u)" -eq 0 ]] || fail "run as root."
22
22
 
23
23
  if [[ ! -d "${GHIDRA_DIR}" ]]; then
24
24
  BUILD_DIR="$(mktemp -d -t ghidra-XXXXXXXX)"