File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,7 +164,8 @@ if [[ -n $TARGETS ]]; then
164164 cmd+=" -e TARGETS=$TARGETS "
165165fi
166166
167- output_dir=$( get_output_dir " $script_base " " $subarch " " $distro " " $version " " $task " " $DEFCONFIG " " $TARGETS " " $CLANG " )
167+ output_dir=$( get_output_dir " $script_base " " $subarch " " $distro " " $version " " $task " " $DEFCONFIG " " $TARGETS " " $CLANG " " " )
168+ output_symlink=$( get_output_dir " $script_base " " $subarch " " $distro " " $version " " $task " " $DEFCONFIG " " $TARGETS " " $CLANG " " symlink" )
168169mkdir -p " $output_dir " || exit 1
169170
170171cmd+=" -v $output_dir :/output:rw "
@@ -202,4 +203,10 @@ cmd+="/bin/container-build.sh $task"
202203
203204(set -x; $cmd )
204205
205- exit $?
206+ ret=$?
207+ if [[ $ret -eq 0 && -n " $output_symlink " ]]; then
208+ rm -f $output_symlink
209+ ln -s $output_dir $output_symlink
210+ fi
211+
212+ exit $ret
Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ script_base="$(realpath "$dir")"
1111
1212IFS=@ read -r task subarch distro version <<< " $1"
1313
14- output_dir=$( get_output_dir " $script_base " " $subarch " " $distro " " $version " " $task " " $DEFCONFIG " " $TARGETS " " $CLANG " )
14+ output_dir=$( get_output_dir " $script_base " " $subarch " " $distro " " $version " " $task " " $DEFCONFIG " " $TARGETS " " $CLANG " " " )
1515
1616(set -x ; rm -rf " $output_dir " )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ function get_output_dir()
2525 local defconfig=" $6 "
2626 local targets=" $7 "
2727 local clang=" $8 "
28+ local symlink=" $9 "
2829 local d
2930
3031 if [[ -z " $script_base " || -z " $subarch " || -z " $distro " ]]; then
@@ -41,6 +42,10 @@ function get_output_dir()
4142 case " $task " in
4243 kernel) ;&
4344 clean-kernel)
45+ if [[ -n " $symlink " ]]; then
46+ echo " $d /latest-kernel"
47+ return 0
48+ fi
4449 if [[ -n " $defconfig " ]]; then
4550 defconfig=" ${defconfig// \/ / _} "
4651 d=" $d /$defconfig "
@@ -49,6 +54,10 @@ function get_output_dir()
4954 ppctests) ;&
5055 selftests) ;&
5156 clean-selftests)
57+ if [[ -n " $symlink " ]]; then
58+ echo " $d /latest-selftests"
59+ return 0
60+ fi
5261 if [[ -n " $targets " ]]; then
5362 targets=${targets// / _}
5463 targets=${targets// \/ / _}
@@ -59,6 +68,10 @@ function get_output_dir()
5968 ;;
6069 perf) ;&
6170 clean-perf)
71+ if [[ -n " $symlink " ]]; then
72+ echo " $d /latest-perf"
73+ return 0
74+ fi
6275 d=" $d /perf"
6376 ;;
6477 esac
You can’t perform that action at this time.
0 commit comments