2 # Common setup for linux-next scripts
5 # Just in case this gets included twice ...
6 [ "$_next_common_included" ] && return 0
7 _next_common_included=1
9 bin_dir=$(realpath $(dirname "$0"))
10 top_dir=$(dirname "$bin_dir")
12 [ "$LOG_FILE" ] || LOG_FILE="$top_dir/merge.log"
13 SHA1_FILE="$top_dir/SHA1s"
14 CTRL_FILE="$top_dir/etc/control"
17 build_dir="/home/sfr/next/next"
20 gpg_key=89F91C0A41D5C07A
21 kup_gpg_key=015042F34957D06C
23 [ "$NEXT_BUILD_HOST" ] && {
24 build_host="$NEXT_BUILD_HOST"
25 [ "$build_host" = "none" ] && build_host=""
27 [ "$NEXT_BUILD_DIR" ] && build_dir="$NEXT_BUILD_DIR"
28 [ "$NEXT_GCC_VERSION" ] && gcc_version="$NEXT_GCC_VERSION"
29 gcc_ppc_version=$gcc_version
30 [ "$NEXT_GCC_PPC_VERSION" ] && gcc_ppc_version="$NEXT_GCC_PPC_VERSION"
31 gcc_ppcle_version=$gcc_ppc_version
32 [ "$NEXT_GCC_PPCLE_VERSION" ] && gcc_ppcle_version="$NEXT_GCC_PPCLE_VERSION"
33 [ "$NEXT_J_FACTOR" ] && j_factor="$NEXT_J_FACTOR"
44 export NEXT_BUILD_HOST="${build_host:-none}"
45 export NEXT_BUILD_DIR="$build_dir"
46 export NEXT_GCC_VERSION="$gcc_version"
47 export NEXT_GCC_PPC_VERSION="$gcc_ppc_version"
48 export NEXT_GCC_PPCLE_VERSION="$gcc_ppcle_version"
49 export NEXT_J_FACTOR="$j_factor"
54 awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' $CTRL_FILE
57 check_unmerged_files()
63 um_files=$(git diff 2>&1 | sed -n 's/^\* Unmerged path //p')
64 if [ "$um_files" ] && [ -f "../merge-files/$tree" ]; then
65 rm_files=$(grep -F "$um_files" "../merge-files/$tree")
66 if [ "$rm_files" ]; then
67 "$bin_dir/do_rm" $rm_files