docs: introducing to iris (#11)

This commit is contained in:
VERSE
2026-07-03 11:37:20 +07:00
committed by GitHub
parent b9cec2b3ac
commit 24fddaccfe
7 changed files with 260 additions and 9 deletions
+26 -8
View File
@@ -49,18 +49,36 @@ main() {
bin=$(find . -name "iris" -type f | head -1)
[ -z "$bin" ] && err "Binary not found in archive"
mkdir -p "${BIN_DIR}"
cp "$bin" "${BIN_DIR}/iris"
chmod +x "${BIN_DIR}/iris"
echo ""
echo "Installed iris to ${BIN_DIR}/iris"
echo ""
# check if we have write permission to the install directory
has_write_permission=0
if [ -d "${BIN_DIR}" ]; then
if [ -w "${BIN_DIR}" ]; then
has_write_permission=1
fi
else
parent_dir=$(dirname "${BIN_DIR}")
if [ -w "${parent_dir}" ]; then
has_write_permission=1
fi
fi
if "${BIN_DIR}/iris" version >/dev/null 2>&1; then
echo "Installation verified."
else
echo "Warning: could not verify binary"
chmod +x "$bin"
if "$bin" version >/dev/null 2>&1; then
echo "Binary verification successful."
else
echo "Warning: could not verify binary"
fi
cp "$bin" "/tmp/iris"
chmod +x "/tmp/iris"
echo ""
echo "Warning: permission denied to write to ${BIN_DIR}"
echo "Please complete the installation by running:"
echo " sudo cp /tmp/iris ${BIN_DIR}/iris && sudo chmod +x ${BIN_DIR}/iris"
fi
echo ""