我有以下用于创建项目的脚本:
clear
version="0.0.2"
echo "Project creator"
echo "---------------"
# ask user to specify a directory (could start with spelled-out home directory)
directoryName=""
# Input must meet the following criteria:
# 1.) No spaces at all in the directory path
# 2.) some characters must be entered
while [[ ${#directoryName} -eq 0 || $directoryName == *" "* ]]
do
echo -e "\nEnter the full directory of the project (no spaces):"
read directoryName
done
echo "You entered: $directoryName"
# uate directoryName so …
Run Code Online (Sandbox Code Playgroud)