rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 660 forks source link

change prebuild files attribute if exist, in case git clone code doesn't have 'x' permission of it #3053

Open wonleing opened 3 years ago

wonleing commented 3 years ago
diff --git a/scripts/build-images b/scripts/build-images
index 171b4b6..0ff4fea 100755
--- a/scripts/build-images
+++ b/scripts/build-images
@@ -15,7 +15,8 @@ for i in $BASE/[0-9]*; do
     name="os-$(echo ${i} | cut -f2 -d-)"
     tag="${OS_REPO}/${name}:${VERSION}${SUFFIX}"
     echo "build-image: Building ${tag}"
-    if [ -x ${i}/prebuild.sh ]; then
+    if [ -e ${i}/prebuild.sh ];then
+        chmod a+x ${i}/prebuild.sh
         ${i}/prebuild.sh
     fi