# It's better to run the below scripts step by step.
+export server=$1 +export action=$2
+server_skip() +{
- local deploy_script=$1
- [ "$server" != "server" ] && ${deploy_script}
+}
[[ $CCI_SRC ]] || export CCI_SRC=$(cd $(dirname $(realpath $0)); git rev-parse --show-toplevel) cd $CCI_SRC/sparrow || exit
-0-package/install +server_skip 0-package/install
The better style is to make server_skip a test function, and call it this way
directly use like this? [ $1 != 'server'] && 0-package/install
Even better, can we split this script into two smaller ones?
我应该根据什么来拆分呢, 把需要网络的放一块,不需要的放在一个脚本里面吗?
Thanks, Yinsi
Thanks, Fengguang
0-package/common 1-storage/tiny 1-storage/permission @@ -15,9 +24,9 @@ cd $CCI_SRC/sparrow || exit 2-network/iptables 2-network/nfs 2-network/cifs -3-code/git
+server_skip 3-code/git 3-code/dev-env . /etc/profile.d/compass.sh -4-docker/buildall -5-build/ipxe +4-docker/buildall $action
+server_skip 5-build/ipxe 7-systemd/systemd-setup -- 2.23.0