[buildbot] phase1: ccache.sh: fail on error

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 6 06:55:40 PST 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/cc9df2f066bcee0aeb64769d18e9f6a4e5d152b9

commit cc9df2f066bcee0aeb64769d18e9f6a4e5d152b9
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Wed Dec 6 15:54:11 2017 +0100

    phase1: ccache.sh: fail on error
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase1/ccache.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/phase1/ccache.sh b/phase1/ccache.sh
index 057733b..3c4c614 100755
--- a/phase1/ccache.sh
+++ b/phase1/ccache.sh
@@ -2,19 +2,19 @@
 
 export LC_ALL=C
 
-mkdir -p "$HOME/.ccache"
+mkdir -p "$HOME/.ccache" || exit 1
 
 grep -sq max_size "$HOME/.ccache/ccache.conf" || \
-	echo "max_size = 10.0G" >> "$HOME/.ccache/ccache.conf"
+	echo "max_size = 10.0G" >> "$HOME/.ccache/ccache.conf" || exit 1
 
 grep -sq compiler_check "$HOME/.ccache/ccache.conf" || \
-	echo "compiler_check = %compiler% -dumpmachine; %compiler% -dumpversion" >> "$HOME/.ccache/ccache.conf"
+	echo "compiler_check = %compiler% -dumpmachine; %compiler% -dumpversion" >> "$HOME/.ccache/ccache.conf" || exit 1
 
 for dir in $(make --no-print-directory val.TOOLCHAIN_DIR val.STAGING_DIR val.STAGING_DIR_HOST V=s | grep staging_dir/); do
 	if [ ! -L "$dir/ccache" ] || [ -L "$dir/ccache" -a ! -d "$dir/ccache" ]; then
-		mkdir -vp "$dir"
-		rm -vrf "$dir/ccache"
-		ln -vs "$HOME/.ccache" "$dir/ccache"
+		mkdir -vp "$dir" || exit 1
+		rm -vrf "$dir/ccache" || exit 1
+		ln -vs "$HOME/.ccache" "$dir/ccache" || exit 1
 	fi
 done
 



More information about the lede-commits mailing list