INNER CODE UNIT · Shell

root

dunwu/linux-tutorial · codes/linux/download.sh:28

root=/home/scripts/linux-tutorial
printf "\n${GREEN}>>>>>>>> Download linux-tutorial to ${root} begin.${RESET}\n"
command -v yum > /dev/null 2>&1 || {
	printf "\n${RED}Not detected yum.${RESET}";
	exit 1;
}

command -v git > /dev/null 2>&1 || {
	printf "\n${YELLOW}Not detected git. Install git.${RESET}\n";
	yum install -y git;
}

if [[ -d ${root} ]]; then
	cd ${root}
	git pull
else
	mkdir -p ${root}
	git clone https://gitee.com/turnon/linux-tutorial.git ${root}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…