diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-02-11 22:38:54 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-02-11 22:38:54 +0100 |
commit | 530288f5a725848bb899636665ea3f14f9398fad (patch) | |
tree | 097879192b3926c5c6503b058d3582d680110bfc /envsetup.sh | |
parent | 34b65b9553c9395846ae1bbe186be2667139db79 (diff) | |
parent | fafb7e2a14706f75bd76aca21c1c7d695f938ed3 (diff) | |
download | build-530288f5a725848bb899636665ea3f14f9398fad.zip build-530288f5a725848bb899636665ea3f14f9398fad.tar.gz build-530288f5a725848bb899636665ea3f14f9398fad.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/LineageOS/android_build into replicant-6.0
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/envsetup.sh b/envsetup.sh index f8ec4ed..becedef 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -24,8 +24,8 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - sepgrep: Greps on all local sepolicy files. - sgrep: Greps on all local source files. - godir: Go to the directory containing a file. -- cmremote: Add git remote for CM Gerrit Review -- cmgerrit: A Git wrapper that fetches/pushes patch from/to CM Gerrit Review +- cmremote: Add git remote for LineageOS Gerrit Review +- cmgerrit: A Git wrapper that fetches/pushes patch from/to LineageOS Gerrit Review - cmrebase: Rebase a Gerrit change and push it again - aospremote: Add git remote for matching AOSP repository - cafremote: Add git remote for matching CodeAurora repository. @@ -84,9 +84,9 @@ function check_product() return fi - if (echo -n $1 | grep -q -e "^cm_") ; then - CM_BUILD=$(echo -n $1 | sed -e 's/^cm_//g') - export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10) + if (echo -n $1 | grep -q -e "^lineage_") ; then + CM_BUILD=$(echo -n $1 | sed -e 's/^lineage_//g') + export BUILD_NUMBER=$((date +%s%N ; echo $CM_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10) else if (echo -n $1 | grep -q -e "^replicant_") ; then CM_BUILD=$(echo -n $1 | sed -e 's/^replicant_//g') @@ -570,11 +570,16 @@ function breakfast() # A buildtype was specified, assume a full device name lunch $target else - # This is probably just the CM model name + # This is probably just the Lineage model name if [ -z "$variant" ]; then variant="userdebug" fi - lunch cm_$target-$variant + lunch lineage_$target-$variant + if [ $? -ne 0 ]; then + # try CM + echo "** Warning: '$target' is using CM-based makefiles. This will be deprecated in the next major release." + lunch cm_$target-$variant + fi fi fi return $? @@ -725,8 +730,8 @@ function tapas() function eat() { if [ "$OUT" ] ; then - MODVERSION=$(get_build_var CM_VERSION) - ZIPFILE=cm-$MODVERSION.zip + MODVERSION=$(get_build_var LINEAGE_VERSION) + ZIPFILE=lineage-$MODVERSION.zip ZIPPATH=$OUT/$ZIPFILE if [ ! -f $ZIPPATH ] ; then echo "Nothing to eat" @@ -1683,12 +1688,12 @@ function cmremote() fi git remote rm cmremote 2> /dev/null GERRIT_REMOTE=$(git config --get remote.github.projectname) - CMUSER=$(git config --get review.review.cyanogenmod.org.username) + CMUSER=$(git config --get review.review.lineageos.org.username) if [ -z "$CMUSER" ] then - git remote add cmremote ssh://review.cyanogenmod.org:29418/$GERRIT_REMOTE + git remote add cmremote ssh://review.lineageos.org:29418/$GERRIT_REMOTE else - git remote add cmremote ssh://$CMUSER@review.cyanogenmod.org:29418/$GERRIT_REMOTE + git remote add cmremote ssh://$CMUSER@review.lineageos.org:29418/$GERRIT_REMOTE fi echo "Remote 'cmremote' created" } @@ -1723,7 +1728,7 @@ function cafremote() then PFX="platform/" fi - git remote add caf git://codeaurora.org/$PFX$PROJECT + git remote add caf https://source.codeaurora.org/quic/la/$PFX$PROJECT echo "Remote 'caf' created" } @@ -1845,7 +1850,7 @@ function cmgerrit() { $FUNCNAME help return 1 fi - local user=`git config --get review.review.cyanogenmod.org.username` + local user=`git config --get review.review.lineageos.org.username` local review=`git config --get remote.github.review` local project=`git config --get remote.github.projectname` local command=$1 @@ -2080,7 +2085,7 @@ function cmrebase() { local dir="$(gettop)/$repo" if [ -z $repo ] || [ -z $refs ]; then - echo "CyanogenMod Gerrit Rebase Usage: " + echo "LineageOS Gerrit Rebase Usage: " echo " cmrebase <path to project> <patch IDs on Gerrit>" echo " The patch IDs appear on the Gerrit commands that are offered." echo " They consist on a series of numbers and slashes, after the text" @@ -2102,7 +2107,7 @@ function cmrebase() { echo "Bringing it up to date..." repo sync . echo "Fetching change..." - git fetch "http://review.cyanogenmod.org/p/$repo" "refs/changes/$refs" && git cherry-pick FETCH_HEAD + git fetch "http://review.lineageos.org/p/$repo" "refs/changes/$refs" && git cherry-pick FETCH_HEAD if [ "$?" != "0" ]; then echo "Error cherry-picking. Not uploading!" return |