- 拷贝文件并解压
#! /bin/bash PROJECT_DIR='$HOME/Projects' PROJECT_NAME='web' CODE_PATH='$HOME/web.tar.gz' function uppack_code { if [ ! -e "${PROJECT_DIR}" ]; then { echo "${PROJECT_DIR} is not existed." mkdir -p ${PROJECT_DIR} && echo "Created ${PROJECT_DIR} success" || echo "Created ${PROJECT_DIR} failed" } cd "${PROJECT_DIR}" [ -e "${PROJECT_NAME}" ] && rm -rf tar -zxvf "${CODE_PATH}" ./ }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)