차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
linuxfromscratch:auto-lfs [2024/05/14 15:40] – [파일 다운로드 링크 처리] baecy | linuxfromscratch:auto-lfs [2024/06/07 20:14] (현재) – [파일 다운로드 링크 처리] baecy | ||
---|---|---|---|
줄 49: | 줄 49: | ||
if mountpoint $LFS/$kvfs; then umount -q $LFS/$kvfs; fi | if mountpoint $LFS/$kvfs; then umount -q $LFS/$kvfs; fi | ||
done | done | ||
- | findmnt -o FSTYPE, | + | findmnt -D -R $LFS |
echo "Ok unmount unnecessary devices" | echo "Ok unmount unnecessary devices" | ||
echo "Good bye" | echo "Good bye" | ||
줄 55: | 줄 55: | ||
else | else | ||
echo " | echo " | ||
- | findmnt -o FSTYPE, | + | findmnt -D -R $LFS |
exit 0 | exit 0 | ||
fi | fi | ||
줄 70: | 줄 70: | ||
if ! mountpoint -q $LFS/ | if ! mountpoint -q $LFS/ | ||
if ! mountpoint -q $LFS/ | if ! mountpoint -q $LFS/ | ||
- | findmnt -o FSTYPE, | + | findmnt -D -R $LFS |
# Run ' | # Run ' | ||
chroot " | chroot " | ||
줄 119: | 줄 119: | ||
- 이미 다운로드 완료한 파일의 경우 처리 추가 | - 이미 다운로드 완료한 파일의 경우 처리 추가 | ||
- 작업 디렉토리의 소유권 확인 추가 | - 작업 디렉토리의 소유권 확인 추가 | ||
+ | - 출력 색상 변수 설정 | ||
추가할 사항 | 추가할 사항 | ||
- alias 등록 확인 | - alias 등록 확인 | ||
+ | - wget, git, gawk 설치 여부 확인 | ||
+ | |||
+ | 수정할 사항 | ||
+ | - git clone 사용 할 때 작업 디렉터리에 먼저 받고 source 디렉터리에 복사하는 방식으로 변경 필요. | ||
+ | |||
<code user=user host=host lang=bash> | <code user=user host=host lang=bash> | ||
줄 130: | 줄 136: | ||
<code lang=bash> | <code lang=bash> | ||
#!/bin/bash | #!/bin/bash | ||
+ | |||
+ | Green=' | ||
+ | BIGreen=' | ||
+ | Red=' | ||
+ | Yellow=' | ||
+ | Color_Off=' | ||
+ | |||
+ | if [ " | ||
+ | echo -e "p4c is not ${Yellow}alias registered${Color_Off}, | ||
+ | source ${HOME}/ | ||
+ | return 2>&/ | ||
+ | fi | ||
+ | |||
if [ -z " | if [ -z " | ||
InputStringType=$(echo " | InputStringType=$(echo " | ||
줄 138: | 줄 157: | ||
GitCheck=${TargetFile: | GitCheck=${TargetFile: | ||
ZipCheck=${TargetFile: | ZipCheck=${TargetFile: | ||
+ | TargetDir=$(echo " | ||
NotFoundMsg1=" | NotFoundMsg1=" | ||
However, it does not exist, so it will move to the ${Yellow}most recent directory created${Color_Off}.\n\ | However, it does not exist, so it will move to the ${Yellow}most recent directory created${Color_Off}.\n\ | ||
Please check if it is correct." | Please check if it is correct." | ||
- | TargetDir=$(echo " | ||
- | if [ $(stat -c %u $BuildBase) -ne $(id -u) ] ; then echo "Check $BuildBase Ownership"; | + | if [ $(stat -c %u $BuildBase) -ne $(id -u) ] ; then echo -e " |
function chg_dir() { | function chg_dir() { | ||
줄 180: | 줄 199: | ||
case " | case " | ||
https|http|ftp) | https|http|ftp) | ||
- | wget --no-verbose --no-clobber | + | wget --no-verbose -nc --directory-prefix=" |
;; | ;; | ||
*) | *) | ||
줄 199: | 줄 218: | ||
fi | fi | ||
+ | |||
+ | unset InputStringType BuildBase SourceBase TargetFile GitDirCheck GitCheck ZipCheck TargetDir NotFoundMsg1 | ||
</ | </ | ||