#!/bin/bash BRANCH=${1:-main} # check ZSH environment if [ -z "$ZSH" ]; then echo "ZSH environment variable does not defined." exit 1 fi # target folder plugin_dir="$ZSH/custom/plugins/sparo" mkdir -p "$plugin_dir" # download sparo.plugin.zsh to plugin dir echo "Downloading sparo.plugin.zsh to $plugin_dir from $BRANCH branch..." curl -L "https://raw.githubusercontent.com/tiktok/sparo/$BRANCH/zsh-plugin/sparo/sparo.plugin.zsh" -o "$plugin_dir/sparo.plugin.zsh" cat <