docs: keep Chinese README and refresh screenshots
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Post-installation script for ClawX on Linux
|
||||
# Post-installation script for Zhinian Assistant on Linux
|
||||
|
||||
set -e
|
||||
|
||||
@@ -14,20 +14,21 @@ if command -v gtk-update-icon-cache &> /dev/null; then
|
||||
gtk-update-icon-cache -q /usr/share/icons/hicolor || true
|
||||
fi
|
||||
|
||||
# Create symbolic link for ClawX app binary
|
||||
if [ -x /opt/ClawX/clawx ]; then
|
||||
ln -sf /opt/ClawX/clawx /usr/local/bin/clawx 2>/dev/null || true
|
||||
# Create symbolic link for Zhinian Assistant app binary
|
||||
APP_DIR="/opt/智念助手"
|
||||
if [ -x "$APP_DIR/zhinian-assistant" ]; then
|
||||
ln -sf "$APP_DIR/zhinian-assistant" /usr/local/bin/zhinian-assistant 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Create symbolic link for the app-managed openclaw CLI only when it will not
|
||||
# overwrite a user-managed OpenClaw installation.
|
||||
OPENCLAW_WRAPPER="/opt/ClawX/resources/cli/openclaw"
|
||||
OPENCLAW_WRAPPER="$APP_DIR/resources/cli/openclaw"
|
||||
if [ -f "$OPENCLAW_WRAPPER" ]; then
|
||||
chmod +x "$OPENCLAW_WRAPPER" 2>/dev/null || true
|
||||
if [ ! -e /usr/local/bin/openclaw ] || [ "$(readlink /usr/local/bin/openclaw 2>/dev/null || true)" = "$OPENCLAW_WRAPPER" ]; then
|
||||
ln -sf "$OPENCLAW_WRAPPER" /usr/local/bin/openclaw 2>/dev/null || true
|
||||
else
|
||||
echo "Keeping existing /usr/local/bin/openclaw; it is not managed by ClawX."
|
||||
echo "Keeping existing /usr/local/bin/openclaw; it is not managed by Zhinian Assistant."
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -37,9 +38,9 @@ fi
|
||||
# we rely on the AppArmor profile below instead, so 0755 is correct there.
|
||||
if ! { [[ -L /proc/self/ns/user ]] && unshare --user true; }; then
|
||||
# No user namespace support — fall back to SUID sandbox
|
||||
chmod 4755 '/opt/ClawX/chrome-sandbox' || true
|
||||
chmod 4755 "$APP_DIR/chrome-sandbox" || true
|
||||
else
|
||||
chmod 0755 '/opt/ClawX/chrome-sandbox' || true
|
||||
chmod 0755 "$APP_DIR/chrome-sandbox" || true
|
||||
fi
|
||||
|
||||
# Install AppArmor profile (Ubuntu 24.04+).
|
||||
@@ -50,8 +51,8 @@ fi
|
||||
# We first check if AppArmor is enabled and if the running version supports abi/4.0
|
||||
# (Ubuntu 22.04 does not; it runs fine without the profile, so we skip it there).
|
||||
if apparmor_status --enabled > /dev/null 2>&1; then
|
||||
APPARMOR_PROFILE_SOURCE='/opt/ClawX/resources/apparmor-profile'
|
||||
APPARMOR_PROFILE_TARGET='/etc/apparmor.d/clawx'
|
||||
APPARMOR_PROFILE_SOURCE="$APP_DIR/resources/apparmor-profile"
|
||||
APPARMOR_PROFILE_TARGET='/etc/apparmor.d/zhinian-assistant'
|
||||
if apparmor_parser --skip-kernel-load --debug "$APPARMOR_PROFILE_SOURCE" > /dev/null 2>&1; then
|
||||
cp -f "$APPARMOR_PROFILE_SOURCE" "$APPARMOR_PROFILE_TARGET"
|
||||
|
||||
@@ -64,4 +65,4 @@ if apparmor_status --enabled > /dev/null 2>&1; then
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "ClawX has been installed successfully."
|
||||
echo "Zhinian Assistant has been installed successfully."
|
||||
|
||||
Reference in New Issue
Block a user