File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 22set -e
33
44cargo build --release
5- echo " Install binary..."
5+
6+ # Check bash-completion
7+ if [ ! -d /etc/bash_completion.d ]; then
8+ echo " Directory /etc/bash_completion.d does not exist. Please install bash-completion first."
9+ exit 1
10+ fi
11+
12+ # Install or upgrade the binary
13+ if [ -f /usr/bin/bash-pinyin-completion-rs ]; then
14+ echo " The binary /usr/bin/bash-pinyin-completion-rs already exists. Upgrading..."
15+ else
16+ echo " Installing binary..."
17+ fi
618sudo cp target/release/bash-pinyin-completion-rs /usr/bin/
7- echo " Install bash-completion script..."
19+
20+ # Install or upgrade the script
21+ if [ -f /etc/bash_completion.d/bash_pinyin_completion ]; then
22+ echo " The bash-completion script /etc/bash_completion.d/bash_pinyin_completion already exists. Upgrading..."
23+ else
24+ echo " Installing bash-completion script..."
25+ fi
826sudo cp scripts/bash_pinyin_completion /etc/bash_completion.d/
You can’t perform that action at this time.
0 commit comments