第一个Bash脚本问题

我是Bash的新手,我正在尝试制作一个简单的脚本来自动化Git拉动和推出回购,但我无法让它工作。

这是代码的pastebin: http : //pastebin.com/JrXqktD4

#!/bin/bash #Git Puller / Pusher for MobArenaBattles echo "Please type whether you want to pull or push:" read proc cd $HOME/Desktop/IdeaProjects/Plugins/MobArenaBattles if ["$proc"="push"]; then echo "Please type the commit message:" read message git status git add -A git commit -m $message git push elif ["$proc"="pull"]; then git status git pull else echo "Invalid choice! Exiting." fi 

我得到的错误是:

 ./MAB Git.sh: line 9: [push=push]: command not found ./MAB Git.sh: line 16: [push=pull]: command not found 

我已经尝试使用==-eq但它出现了同样的错误。 对不起,如果我是傻瓜,这是我的第一次尝试。

提前致谢。

你需要空格:

 if [ "$s1" == "$s2" ]