소스 검색

lean on other Makefile to create directories

the other makefile is good for creating directories and bootstraping
the app, here we use it
Evan Carroll 5 년 전
부모
커밋
9dd0fd72cf
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      images/base.sh

+ 4 - 5
images/base.sh

@@ -3,8 +3,10 @@
 ctr=$(buildah from alpine:latest)
 mnt=$(buildah mount "$ctr")
 
-mkdir -p "$mnt/tmp/tcms"
+mkdir -p "$mnt/srv/tcms" "$mnt/tmp/tcms"
+cp -R bin/ config/ data/ www/ lib "$mnt/srv/tcms";
 cp Makefile.PL "$mnt/tmp/tcms/"
+make -C "$mnt/srv/tcms" --makefile "$PWD/Makefile" prereq-frontend reset-dummy-data
 
 buildah run -- $ctr sh <<EOF
   apk update
@@ -18,16 +20,13 @@ EOF
 
 rm -rf \
 	"$mnt/tmp/tcms"       \
-	"$mnt/var/cache"      \
+	"$mnt/var/cache/*"    \
 	"$mnt/root/.cpanm"    \
 	"$mnt/usr/share/man/" \
   "$mnt/usr/local/share/man"
 
 find "$mnt/usr/lib/perl5" -name '*.pod' -delete
 
-mkdir -p "$mnt/srv/tcms"
-cp -R bin/ config/ data/ www/ lib "$mnt/srv/tcms";
-
 buildah config                              \
   --workingdir "/srv/tcms/"                 \
 	--entrypoint '["/usr/local/bin/starman"]' \