os="lin-x64" version="10.5.1" hash=$(curl -s https://raw.githubusercontent.com/acitd/hash/refs/heads/main/stylezero/$version/$os-sha256) url="https://hub.stylezero.org/dist/stylezero/$version/stylezero-$version-$os.tar.xz" tmp="tmp-stylezero-$$.tar.xz" dir="$HOME/.local/opt/stylezero" curl -sSL "$url" -o "$tmp" if sha256sum "$tmp" | grep -q "^$hash ";then mkdir -p "$dir" "$HOME/.local/bin" rm -rf "$dir"/* tar -xJf "$tmp" -C "$dir" rm "$tmp" chmod u+x -R "$dir" ln -sf "$dir/stylezero" "$HOME/.local/bin" if ! grep -qF -- '.local/bin' "$HOME/.bashrc";then echo 'if [ -d "$HOME/.local/bin" ]; then PATH="$HOME/.local/bin:$PATH"; fi' >> "$HOME/.bashrc" fi echo "StyleZero $version installed." else echo "Error: Hash doesn't match." rm "$tmp" fi