diff options
| author | Andrew Turner <andrew@FreeBSD.org> | 2016-01-28 20:21:15 +0000 |
|---|---|---|
| committer | Andrew Turner <andrew@FreeBSD.org> | 2016-01-28 20:21:15 +0000 |
| commit | 235ad806ee815395bce54dc1b0ce1c06cd29b44a (patch) | |
| tree | 41cbd9055ad0d6dfa04377df1bb51f3c3f3948e2 /scripts | |
| parent | da75c2cc5808a45edc76752ba495dcc5dcd4346c (diff) | |
Notes
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/cronjob | 2 | ||||
| -rwxr-xr-x | scripts/filter.sh | 2 | ||||
| -rwxr-xr-x | scripts/flatten-symlinks.sh | 31 | ||||
| -rwxr-xr-x | scripts/index-filter.sh | 5 | ||||
| -rwxr-xr-x | scripts/merge-new-release.sh | 22 |
5 files changed, 59 insertions, 3 deletions
diff --git a/scripts/cronjob b/scripts/cronjob index d0a0c97b1921..eeedca0506ab 100755 --- a/scripts/cronjob +++ b/scripts/cronjob @@ -16,7 +16,7 @@ fi if [ -z "$LATEST_VERSION" ] ; then FINGER_BANNER="https://www.kernel.org/finger_banner" LATEST_VERSION=$(wget --quiet -O - "$FINGER_BANNER" |\ - sed -n -e 's/^The latest mainline 3 version of the Linux kernel is:\s*\(.*\)$/\1/p') + sed -n -e '0,/^The latest mainline version of the Linux kernel is:\s*\(.*\)$/s//\1/p') fi if [ -z "$LATEST_VERSION" ] ; then diff --git a/scripts/filter.sh b/scripts/filter.sh index 61ecb36fee97..e82218a1ca9d 100755 --- a/scripts/filter.sh +++ b/scripts/filter.sh @@ -30,7 +30,7 @@ git branch -f $UPSTREAM_REWRITTEN FETCH_HEAD sh $SCRIPTS/git-filter-branch --force \ --index-filter ${SCRIPTS}/index-filter.sh \ --msg-filter 'cat && /bin/echo -e "\n[ upstream commit: $GIT_COMMIT ]"' \ - --tag-name-filter 'while read t ; do /bin/echo -n $t-dts ; done' \ + --tag-name-filter 'while read t ; do /bin/echo -n $t-dts-raw ; done' \ --prune-empty --state-branch refs/heads/filter-state \ -- $RANGE diff --git a/scripts/flatten-symlinks.sh b/scripts/flatten-symlinks.sh new file mode 100755 index 000000000000..84d007f40f34 --- /dev/null +++ b/scripts/flatten-symlinks.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +while read mode object stage path ; do + case "$mode" in + 120000) + # symbolic link + deref=$(echo $GIT_COMMIT:$path | git cat-file --batch-check='deref-ok %(objectname)' --follow-symlinks) + case "$deref" in + deref-ok*) + echo -e "100644 ${deref#deref-ok } $stage\t$path" + ;; + dangling*) # skip + ;; + *) # the rest, missing etc + echo >&2 "Failed to parse symlink $GIT_COMMIT:$path $deref" + exit 1 + ;; + esac + ;; + 100*) + # Regular file, just pass through + echo -e "$mode $object $stage\t$path" + ;; + *) + echo >&2 "Unhandled ls-tree entry: $line" + exit 1 + ;; + esac +done diff --git a/scripts/index-filter.sh b/scripts/index-filter.sh index d68238af2feb..e672867ce389 100755 --- a/scripts/index-filter.sh +++ b/scripts/index-filter.sh @@ -3,7 +3,10 @@ set -e set -o pipefail -git ls-files -s | tee /tmp/bar | sed -n -f ${SCRIPTS}/rewrite-paths.sed | tee /tmp/foo | \ +crumbs=/tmp/device-tree-export +git ls-files -s | tee $crumbs-orig | \ + ${SCRIPTS}/flatten-symlinks.sh | tee $crumbs-flattened | \ + sed -n -f ${SCRIPTS}/rewrite-paths.sed | tee $crumbs-rewritten | \ GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info if [ -f "$GIT_INDEX_FILE.new" ] ; then diff --git a/scripts/merge-new-release.sh b/scripts/merge-new-release.sh new file mode 100755 index 000000000000..cf2ac4191534 --- /dev/null +++ b/scripts/merge-new-release.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +case $1 in + v*-dts) ;; + '') + echo >&2 "No version given" + exit 1 + ;; + *) + echo >&2 "Unexpected version: $1" + exit 1 + ;; +esac + +v=$1 + +set -ex + +git merge --no-edit "${v}-raw" +git clean -fdqx +make -k -j12 -s +git tag -s -m "Tagging ${v}" -u 695A46C6 "${v}" |
