From 1024a6969a83691aaa75b385955f55764074a1f2 Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 7 Dec 2023 08:57:52 +0800 Subject: [PATCH] fix share --- etc/init.shy | 2 +- src/main.sh | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/etc/init.shy b/etc/init.shy index 252f8c92..0311733c 100644 --- a/etc/init.shy +++ b/etc/init.shy @@ -1,6 +1,6 @@ ~web config dream binary "https://2021.shylinux.com/chat/pod/" - dream create name "20210308-sshd" icon usr/icons/ssh.png repos `https://shylinux.com/x/sshd` + dream create name "20210308-sshd" icon usr/icons/ssh.png repos `https://shylinux.com/x/sshd` restart always dream create name "20230511-linux-story" icon src/linux.png repos `https://shylinux.com/x/linux-story` dream create name "20230511-nginx-story" icon src/server/nginx.png repos `https://shylinux.com/x/nginx-story` restart always dream create name "20230511-docker-story" icon src/client/docker.png repos `https://shylinux.com/x/docker-story` restart always diff --git a/src/main.sh b/src/main.sh index b0fdd98b..dbb796ad 100644 --- a/src/main.sh +++ b/src/main.sh @@ -2,18 +2,19 @@ main() { case "$1" in - app) # 生产环境 + app) shift # 生产环境 + [ -e $ctx_name ] || mkdir $ctx_name; cd $ctx_name export PATH="$PWD/bin:$PWD/local/bin:$PWD/usr/local/go/bin:$PATH" - shift && prepare_ice && while true; do bin/ice.bin serve start dev dev "$@" && break; done + prepare_ice && while true; do ./bin/ice.bin serve start dev dev "$@" && break; done ;; - dev) # 开发环境 - shift && prepare_system; require miss.sh; [ -f ~/.gitconfig ] || ish_dev_git_prepare + dev) shift # 开发环境 + prepare_system; require miss.sh; [ -f ~/.gitconfig ] || ish_dev_git_prepare git config --global "url.$ctx_dev/x/.insteadof" "${ctx_repos%/*}/" - git clone $ctx_repos ${ctx_repos##*/}; cd ${ctx_repos##*/} && source etc/miss.sh - ish_miss_serve_log dev dev "$@" + git clone $ctx_repos ${ctx_repos##*/} + cd ${ctx_repos##*/} && source etc/miss.sh dev dev "$@" ;; cmd) # 命令环境 - ish_sys_dev_init >/dev/null; shift; [ -n "$*" ] && ish_sys_dev_run "$@" + ish_sys_dev_init >/dev/null; shift; [ -n "$*" ] && ish_sys_dev_run "$@" ;; *) echo "hello world"