Initial commit on Forgejo
Fresh repository history for elektrine/tarakan hosted at https://git.elektrine.com/elektrine/tarakan.
This commit is contained in:
commit
af6077b9c3
455 changed files with 78366 additions and 0 deletions
BIN
priv/static/favicon.ico
Normal file
BIN
priv/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 B |
BIN
priv/static/fonts/chakra-petch-latin-400.woff2
Normal file
BIN
priv/static/fonts/chakra-petch-latin-400.woff2
Normal file
Binary file not shown.
BIN
priv/static/fonts/chakra-petch-latin-500.woff2
Normal file
BIN
priv/static/fonts/chakra-petch-latin-500.woff2
Normal file
Binary file not shown.
BIN
priv/static/fonts/chakra-petch-latin-700.woff2
Normal file
BIN
priv/static/fonts/chakra-petch-latin-700.woff2
Normal file
Binary file not shown.
7
priv/static/images/logo.svg
Normal file
7
priv/static/images/logo.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66 66" fill="currentColor" aria-hidden="true">
|
||||
<polygon points="33,0 41,18 41,48 33,66 25,48 25,18" />
|
||||
<polygon points="0,0 18,26 33,33 26,18" />
|
||||
<polygon points="66,0 48,26 33,33 40,18" />
|
||||
<polygon points="0,66 18,40 33,33 26,48" />
|
||||
<polygon points="66,66 48,40 33,33 40,48" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 349 B |
BIN
priv/static/images/og-image.png
Normal file
BIN
priv/static/images/og-image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
15
priv/static/images/og-image.svg
Normal file
15
priv/static/images/og-image.svg
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630" role="img" aria-label="Tarakan - public security record">
|
||||
<rect width="1200" height="630" fill="#000000" />
|
||||
<rect x="24" y="24" width="1152" height="582" fill="#0a0a0a" stroke="#2e2e2e" stroke-width="2" />
|
||||
<g transform="translate(96, 249) scale(2)" fill="#e60012">
|
||||
<polygon points="33,0 41,18 41,48 33,66 25,48 25,18" />
|
||||
<polygon points="0,0 18,26 33,33 26,18" />
|
||||
<polygon points="66,0 48,26 33,33 40,18" />
|
||||
<polygon points="0,66 18,40 33,33 26,48" />
|
||||
<polygon points="66,66 48,40 33,33 40,48" />
|
||||
</g>
|
||||
<text x="272" y="302" font-family="'Chakra Petch', Arial, 'Helvetica Neue', sans-serif" font-size="96" font-weight="500" letter-spacing="6" fill="#f2f2f2">TARAKAN</text>
|
||||
<text x="276" y="372" font-family="'Chakra Petch', Arial, 'Helvetica Neue', sans-serif" font-size="34" letter-spacing="2" fill="#9a9a9a">public security record</text>
|
||||
<rect x="96" y="470" width="1008" height="2" fill="#1a1a1a" />
|
||||
<text x="96" y="528" font-family="monospace" font-size="24" fill="#5c5c5c">local agents · public reports · commit-pinned findings</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
127
priv/static/install.sh
Executable file
127
priv/static/install.sh
Executable file
|
|
@ -0,0 +1,127 @@
|
|||
#!/usr/bin/env bash
|
||||
# Install tarakan (tarakan-client) the easy way.
|
||||
# curl -fsSL https://raw.githubusercontent.com/atomine-elektrine/tarakan-client/main/install.sh | bash
|
||||
# Or from a Tarakan host:
|
||||
# curl -fsSL https://your.tarakan.host/install.sh | bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO="${TARAKAN_REPO:-atomine-elektrine/tarakan-client}"
|
||||
BIN_NAME="tarakan"
|
||||
INSTALL_DIR="${TARAKAN_INSTALL_DIR:-${HOME}/.local/bin}"
|
||||
|
||||
say() { printf '%s\n' "$*" >&2; }
|
||||
die() { say "error: $*"; exit 1; }
|
||||
|
||||
need_cmd() {
|
||||
command -v "$1" >/dev/null 2>&1 || die "need '$1' on PATH"
|
||||
}
|
||||
|
||||
detect_os() {
|
||||
case "$(uname -s)" in
|
||||
Linux*) echo linux ;;
|
||||
Darwin*) echo darwin ;;
|
||||
MINGW*|MSYS*|CYGWIN*) echo windows ;;
|
||||
*) die "unsupported OS: $(uname -s)" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
detect_arch() {
|
||||
case "$(uname -m)" in
|
||||
x86_64|amd64) echo amd64 ;;
|
||||
aarch64|arm64) echo arm64 ;;
|
||||
*) die "unsupported arch: $(uname -m)" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
latest_tag() {
|
||||
need_cmd curl
|
||||
# Prefer gh when available; otherwise unauthenticated API.
|
||||
if command -v gh >/dev/null 2>&1; then
|
||||
gh release view --repo "${REPO}" --json tagName -q .tagName 2>/dev/null && return
|
||||
fi
|
||||
curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" \
|
||||
| sed -n 's/.*"tag_name":[[:space:]]*"\([^"]*\)".*/\1/p' \
|
||||
| head -n1
|
||||
}
|
||||
|
||||
install_from_release() {
|
||||
local os arch tag version archive url tmp dir binary
|
||||
os="$(detect_os)"
|
||||
arch="$(detect_arch)"
|
||||
tag="$(latest_tag)"
|
||||
[[ -n "${tag}" ]] || return 1
|
||||
version="${tag//\//-}"
|
||||
if [[ "${os}" == "windows" ]]; then
|
||||
archive="tarakan_${version}_${os}_${arch}.zip"
|
||||
else
|
||||
archive="tarakan_${version}_${os}_${arch}.tar.gz"
|
||||
fi
|
||||
url="https://github.com/${REPO}/releases/download/${tag}/${archive}"
|
||||
tmp="$(mktemp -d)"
|
||||
trap 'rm -rf "${tmp}"' RETURN
|
||||
|
||||
say "downloading ${url}"
|
||||
curl -fsSL "${url}" -o "${tmp}/${archive}" || return 1
|
||||
|
||||
mkdir -p "${INSTALL_DIR}"
|
||||
if [[ "${os}" == "windows" ]]; then
|
||||
need_cmd unzip
|
||||
unzip -q "${tmp}/${archive}" -d "${tmp}/out"
|
||||
binary="$(find "${tmp}/out" -type f -name 'tarakan.exe' | head -n1)"
|
||||
[[ -n "${binary}" ]] || return 1
|
||||
install -m 755 "${binary}" "${INSTALL_DIR}/tarakan.exe"
|
||||
else
|
||||
need_cmd tar
|
||||
tar -xzf "${tmp}/${archive}" -C "${tmp}"
|
||||
binary="$(find "${tmp}" -type f -name tarakan | head -n1)"
|
||||
[[ -n "${binary}" ]] || return 1
|
||||
install -m 755 "${binary}" "${INSTALL_DIR}/${BIN_NAME}"
|
||||
fi
|
||||
say "installed ${INSTALL_DIR}/${BIN_NAME}"
|
||||
return 0
|
||||
}
|
||||
|
||||
install_with_go() {
|
||||
need_cmd go
|
||||
say "no release binary for this platform; using go install"
|
||||
GOBIN="${INSTALL_DIR}" go install "github.com/${REPO}/cmd/tarakan@latest"
|
||||
say "installed ${INSTALL_DIR}/${BIN_NAME}"
|
||||
}
|
||||
|
||||
path_hint() {
|
||||
case ":${PATH}:" in
|
||||
*":${INSTALL_DIR}:"*) ;;
|
||||
*)
|
||||
say ""
|
||||
say "add to PATH:"
|
||||
say " export PATH=\"${INSTALL_DIR}:\$PATH\""
|
||||
;;
|
||||
esac
|
||||
say ""
|
||||
say "next:"
|
||||
say " tarakan login"
|
||||
say " tarakan worker --agent kimi"
|
||||
say " tarakan --agent kimi --pickup"
|
||||
}
|
||||
|
||||
main() {
|
||||
need_cmd uname
|
||||
need_cmd curl
|
||||
mkdir -p "${INSTALL_DIR}"
|
||||
|
||||
if install_from_release; then
|
||||
path_hint
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if command -v go >/dev/null 2>&1; then
|
||||
install_with_go
|
||||
path_hint
|
||||
exit 0
|
||||
fi
|
||||
|
||||
die "could not download a release for $(detect_os)/$(detect_arch) and Go is not installed.
|
||||
Publish a release tag (v*) on ${REPO}, or install Go and re-run."
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue