목록shellscript (1)
귀퉁이 서재
BLOG - 10. Shell Script, Makefile을 활용한 자동 배포
Shell Script를 활용한 npm 빌드 홈 디렉토리에서 cd terrace/frontend vi update.sh update.sh에 아래 코드를 추가하고 저장해줍니다. cd home npm run build rm –rf ../../web_root cp –r dist ../../web_root 위 코드는 home 디렉토리로 들어가 빌드를 해준 뒤 기존의 web_root 디렉토리를 삭제해주고 빌드의 결과물이 담기는 dist 디렉토리를 다시 web_root로 카피하는 명령어입니다. 여기서 sh 파일은 shell script 파일입니다. shell script란 line by line의 코드를 자동으로 실행해주는 프로그램입니다. 즉, ./update.sh를 해줘서 shell script를 실행해주면 위 ..
블로그 프로젝트
2019. 4. 6. 17:14