[ "$_next_common_included" ] && return 0
_next_common_included=1
-bin_dir=$(dirname "$0")
+bin_dir=$(realpath $(dirname "$0"))
+top_dir=$(dirname "$bin_dir")
-[ "$LOG_FILE" ] || LOG_FILE="../merge.log"
-SHA1_FILE="../SHA1s"
-CTRL_FILE="../etc/control"
+[ "$LOG_FILE" ] || LOG_FILE="$top_dir/merge.log"
+SHA1_FILE="$top_dir/SHA1s"
+CTRL_FILE="$top_dir/etc/control"
build_host="ash"
build_dir="/home/sfr/next/next"
awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' $CTRL_FILE
}
+check_unmerged_files()
+{
+ local tree="$1"
+ local um_files
+ local rm_files
+
+ um_files=$(git diff 2>&1 | sed -n 's/^\* Unmerged path //p')
+ if [ "$um_files" ] && [ -f "../merge-files/$tree" ]; then
+ rm_files=$(grep -F "$um_files" "../merge-files/$tree")
+ if [ "$rm_files" ]; then
+ "$bin_dir/do_rm" $rm_files
+ fi
+ fi
+}
+
true