├── conf ├── auto.conf ├── local.conf ├── layers.txt ├── local-builds.inc ├── bblayers.conf └── site.conf ├── setup-local ├── scripts ├── layers.awk ├── staging_update.sh ├── staging_header.sh ├── staging_sync.sh ├── staging_sync_to_public_feed.sh ├── staging_rebased_git_changelog.sh ├── staging_new.sh ├── update-manifest.py ├── layerman └── oebb.sh ├── update.sh ├── README.md ├── setup-env └── Makefile /conf/auto.conf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /setup-local: -------------------------------------------------------------------------------- 1 | # keep this file compatible with sh (it's read from setup-env) 2 | DISTRO="luneos" 3 | -------------------------------------------------------------------------------- /scripts/layers.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | FS =","; 3 | } 4 | 5 | $1 !~ "^#" { system("${OE_BASE}/scripts/layerman " $1 " " $2 " " $3 " " $4 " " command " " commandarg);} 6 | -------------------------------------------------------------------------------- /scripts/staging_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . scripts/staging_header.sh 4 | 5 | echo "Updating sources" | tee -a ${SOURCE_DIR}/info.${CURRENT_STAGING} 6 | date | tee -a ${SOURCE_DIR}/info.${CURRENT_STAGING} 7 | make update | tee -a ${SOURCE_DIR}/info.${CURRENT_STAGING} 8 | -------------------------------------------------------------------------------- /scripts/staging_header.sh: -------------------------------------------------------------------------------- 1 | CURRENT_STAGING_FILE=scripts/.staging_dir 2 | 3 | if [[ ! -e ${CURRENT_STAGING_FILE} ]] ; then 4 | echo "Current staging dir is not defined, no ${CURRENT_STAGING_FILE}" 5 | exit 1 6 | fi 7 | 8 | CURRENT_DIR=`pwd` 9 | CURRENT_PROJECT=webos-ports 10 | CURRENT_STAGING=`cat ${CURRENT_STAGING_FILE}` 11 | SOURCE_DIR=${CURRENT_PROJECT}/tmp-glibc/deploy 12 | STAGING_DIR=htdocs/builds/luneos-stable-staging 13 | PUBLIC_DIR=htdocs/builds/luneos-stable 14 | -------------------------------------------------------------------------------- /conf/local.conf: -------------------------------------------------------------------------------- 1 | # CONF_VERSION is increased each time build/conf/ changes incompatibly 2 | CONF_VERSION = "2" 3 | 4 | # additionally build a tar.gz image file (as needed for installing on SD) 5 | # IMAGE_FSTYPES = "jffs2 tar.gz" 6 | 7 | # speed up build by parallel building - usefull for multicore cpus 8 | # PARALLEL_MAKE = "-j 4" 9 | # BB_NUMBER_THREADS = "4" 10 | 11 | # enable local builds for apps 12 | # require local-builds.inc 13 | 14 | BB_DISKMON_DIRS = "\ 15 | STOPTASKS,${TMPDIR},1G,100K \ 16 | STOPTASKS,${DL_DIR},1G,100K \ 17 | STOPTASKS,${SSTATE_DIR},1G,100K \ 18 | STOPTASKS,/tmp,100M,100K \ 19 | HALT,${TMPDIR},100M,1K \ 20 | HALT,${DL_DIR},100M,1K \ 21 | HALT,${SSTATE_DIR},100M,1K \ 22 | HALT,/tmp,10M,1K" 23 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ $# -ge 1 ] && LAYERS_DIR=$1 || LAYERS_DIR=~ 4 | 5 | pushd `dirname $0` > /dev/null 6 | SCRIPT_DIR=`pwd -P` 7 | popd > /dev/null 8 | 9 | MSG=${SCRIPT_DIR}/commit-message.txt 10 | RU="git remote update origin" 11 | [ $# -lt 2 -o "$2" != "ru" ] && RU="" 12 | 13 | echo -e "conf/layers.txt: Use latest revisions" > ${MSG} 14 | 15 | cat conf/layers.txt | grep -v HEAD | while IFS="," read DIR URL BRANCH REV; do 16 | NREV=`cd ${LAYERS_DIR}/$DIR; $RU 1>&2; git log origin/$BRANCH | head -n1 | awk '{ print $2 }'` 17 | echo "DIR=$DIR URL=$URL BRANCH=$BRANCH REV=$REV NREV=$NREV" >&2 18 | if [ $REV != ${NREV} ] ; then 19 | echo -e "\n$DIR: ${REV}..${NREV}" >> ${MSG} 20 | cd ${LAYERS_DIR}/$DIR 21 | git log --oneline ${REV}..${NREV} >> ${MSG} 22 | cd - 23 | sed -i "s/$REV/$NREV/g" conf/layers.txt 24 | fi 25 | done 26 | 27 | git commit -s conf/layers.txt -t ${MSG} 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | webos-ports-setup 2 | ================= 3 | 4 | Helper scripts for setting up an LuneOS development environment 5 | 6 | Detailed LuneOS build instructions for various targets and how webos-ports-setup is being used can be found at: 7 | 8 | HP Touchpad (Tenderloin): http://webos-ports.org/wiki/Build_for_Tenderloin 9 | 10 | LG/Google Nexus 4 (Mako): http://webos-ports.org/wiki/Build_for_Mako 11 | 12 | LG/Google Nexus 5 (Hammerhead): http://webos-ports.org/wiki/Build_for_Hammerhead 13 | 14 | Pine64 PinePhone: http://webos-ports.org/wiki/Build_for_PinePhone 15 | 16 | Pine64 PinePhonePro: http://webos-ports.org/wiki/Build_for_PinePhonePro 17 | 18 | Pine64 PineTab2: http://webos-ports.org/wiki/Build_for_PineTab2 19 | 20 | VirtualBox 32 bits (qemux86): http://webos-ports.org/wiki/Build_for_qemux86 21 | 22 | VirtualBox 64 bits (qemux86-64): http://webos-ports.org/wiki/Build_for_qemux86-64 23 | 24 | Xiaomi Mi A1 (Tissot): http://webos-ports.org/wiki/Build_for_Tissot 25 | -------------------------------------------------------------------------------- /scripts/staging_sync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $# -ne 2 ]] ; then 4 | echo "Usage: $0 source_dir target_dir" 5 | echo " source_dir: /workspace/webos-ports/tmp-glibc/deploy" 6 | echo " target_dir: user@server:web/webos-ports" 7 | exit 1 8 | fi 9 | 10 | SOURCE_DIR=$1 11 | TARGET_DIR=$2 12 | 13 | if [ ! -d ${SOURCE_DIR}/images ] ; then 14 | echo "ERROR: ${SOURCE_DIR}/images doesn't exist" 15 | exit 2 16 | fi 17 | 18 | echo "Syncing deploy dir from ${SOURCE_DIR} to ${TARGET_DIR}" 19 | 20 | # count missing md5sums 21 | cd ${SOURCE_DIR}/images 22 | for IMG_FILE in */*.ext2 */*.ext4 */*.zip */*.bin */*.ubi */*.ubifs */*.img */*.jffs2 */*.sum.jffs2 */*.jffs2.nosummary */*.tgz */*.tar.gz */*.tar.bz2 */*.udfu */*.fastboot */*.cpio.gz */*.rpi-sdimg */*.rpi-sdimg.gz */*.wic.gz */*.wic.bmap; do 23 | if [ -e ${IMG_FILE} -a ! -h ${IMG_FILE} -a \( ! -e ${IMG_FILE}.md5 -o ${IMG_FILE}.md5 -ot ${IMG_FILE} \) ] ; then 24 | echo MD5: ${IMG_FILE} 25 | md5sum ${IMG_FILE} | sed 's# .*/# #g' > ${IMG_FILE}.md5 26 | fi 27 | done 28 | 29 | # sync images ipk licenses tools 30 | cd ../ #${SOURCE_DIR} 31 | rsync -avir . ${TARGET_DIR} 32 | 33 | # sync ipk feed and remove missing 34 | #rsync -avi --delete ipk/ ${TARGET_DIR}/ipk/ 35 | -------------------------------------------------------------------------------- /conf/layers.txt: -------------------------------------------------------------------------------- 1 | bitbake,https://github.com/openembedded/bitbake.git,2.8,1c9ec1ffde75809de34c10d3ec2b40d84d258cb4 2 | openembedded-core,https://github.com/openembedded/openembedded-core.git,scarthgap,55e0c38dc28b73fa689446e2d5e564d235a24084 3 | meta-openembedded,https://github.com/openembedded/meta-openembedded.git,scarthgap,e621da947048842109db1b4fd3917a02e0501aa2 4 | meta-qt6,https://code.qt.io/yocto/meta-qt6.git,6.8.1,f4ef1331f0cc49bd4aa1e1aace6dc7f000b9651e 5 | meta-clang,https://github.com/kraj/meta-clang.git,scarthgap,731488911f55ebfe746068512b426351192f82f2 6 | meta-smartphone,https://github.com/shr-distribution/meta-smartphone.git,scarthgap,HEAD 7 | meta-webos-ports,https://github.com/webOS-ports/meta-webos-ports.git,scarthgap,HEAD 8 | meta-pine64-luneos,https://github.com/webOS-ports/meta-pine64-luneos.git,scarthgap,HEAD 9 | meta-rpi-luneos,https://github.com/webOS-ports/meta-rpi-luneos.git,scarthgap,HEAD 10 | meta-raspberrypi,https://github.com/agherzan/meta-raspberrypi.git,scarthgap,aaf976a665daa7e520545908adef8a0e9410b57f 11 | meta-arm,https://git.yoctoproject.org/meta-arm.git,scarthgap,0f1e7bf92c89759f0ab74cfa5be4ee47b092ad46 12 | meta-rockchip,https://git.yoctoproject.org/meta-rockchip.git,scarthgap,9690180b7e9953361958c962b80d891eda8c1028 13 | -------------------------------------------------------------------------------- /scripts/staging_sync_to_public_feed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . scripts/staging_header.sh 4 | 5 | if [[ $# -ne 2 ]] ; then 6 | echo "Usage: $0 remote staging_number" 7 | echo " It will rsync stuff from ${STAGING_DIR}/staging_number to ${PUBLIC_DIR} on remote server" 8 | exit 1 9 | fi 10 | 11 | REMOTE=$1 12 | STAGING_NUMBER=$2 13 | 14 | if [[ 1${STAGING_NUMBER} -ge 1${CURRENT_STAGING} ]] ; then 15 | echo "Cannot sync newer or equal staging_number as current (${CURRENT_STAGING} in ${CURRENT_STAGING_FILE})" 16 | fi 17 | 18 | if [ -z "${REMOTE}" ]; then 19 | echo "ERROR: You need to provide remote" 20 | exit 2 21 | fi 22 | 23 | SOURCE_DIR=${STAGING_DIR}/${STAGING_NUMBER} 24 | TARGET_DIR=${PUBLIC_DIR} 25 | 26 | DATE=`date` 27 | DATE_CLOSED=`ssh ${REMOTE} tail -n1 ${SOURCE_DIR}/info.${STAGING_NUMBER}` 28 | 29 | ssh ${REMOTE} "echo -e \"Merged to public feed\n'''Status:''' Closed (${DATE_CLOSED}) and merged to public feed (${DATE})\n${DATE}\" | tee -a ${SOURCE_DIR}/info.${STAGING_NUMBER}" 30 | 31 | ssh ${REMOTE} rsync -avir ${SOURCE_DIR}/* ${TARGET_DIR} 32 | 33 | # sync ipk feed and remove missing, in this case we can, because all supported MACHINEs were built before staging was closed 34 | ssh ${REMOTE} rsync -avi --delete ${SOURCE_DIR}/ipk/ ${TARGET_DIR}/ipk/ 35 | -------------------------------------------------------------------------------- /conf/local-builds.inc: -------------------------------------------------------------------------------- 1 | # you can create own directory with .bb and .bbappend files: 2 | #LOCAL_BUILD_RECIPES = "/OE/webos/webos-ports/local-builds" 3 | #BBFILES += " ${LOCAL_BUILD_RECIPES}/recipes*/*/*.bb ${LOCAL_BUILD_RECIPES}/recipes*/*/*.bbappend" 4 | 5 | # then for each locally built recipe create .bbappend like this: 6 | # /OE/webos/webos-ports/local-builds/recipes-webos/luna-sysmgr/luna-sysmgr.bbappend: 7 | # inherit externalsrc gitpkgv 8 | # S = "/OE/webos/projects/${PN}" 9 | # B = "${S}" 10 | # SRCPV = "LOCAL" 11 | # PKGV = "LOCAL+gitr${GITPKGV}" 12 | 13 | # more info: 14 | # INHERIT like this doesn't work anymore, if you want to use 15 | # externalsrc, gitver or gitpkgv features you have to alter the recipe itself (add .bbappend) 16 | # INHERIT_append_pn-luna-sysmgr = "externalsrc gitpkgv" 17 | # SRCREV_pn-luna-sysmgr = "${GITSHA}" 18 | 19 | #enable this if you have patches in SRC_URI and it's git:// 20 | #otherwise default will overwrite your local changes when applying patches 21 | #PATCHTOOL_pn-luna-sysmgr = "patch" 22 | #other option is to empty SRC_URI, already done by externalsrc 23 | #SRC_URI_pn-luna-sysmgr = "" 24 | #but then be sure you have also SRCPV set to something 25 | #SRCREV_pn-luna-sysmgr = "LOCAL" 26 | #LOCALCOUNT_pn-luna-sysmgr = "1" 27 | #SRCPV_pn-luna-sysmgr = "${LOCALCOUNT}+${SRCREV}" 28 | -------------------------------------------------------------------------------- /conf/bblayers.conf: -------------------------------------------------------------------------------- 1 | # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf 2 | # changes incompatibly 3 | LCONF_VERSION = "7" 4 | 5 | BBPATH = "${TOPDIR}" 6 | 7 | BBFILES ?= "" 8 | 9 | # Add your overlay location to BBLAYERS 10 | # Make sure to have a conf/layers.conf in there 11 | BBLAYERS = " \ 12 | ${TOPDIR}/meta-webos-ports/meta-luneos \ 13 | ${TOPDIR}/meta-webos-ports/meta-luneui \ 14 | ${TOPDIR}/meta-webos-ports/meta-luneos-backports-5.1 \ 15 | ${TOPDIR}/meta-pine64-luneos \ 16 | ${TOPDIR}/meta-rpi-luneos \ 17 | ${TOPDIR}/meta-raspberrypi \ 18 | ${TOPDIR}/meta-smartphone/meta-google \ 19 | ${TOPDIR}/meta-smartphone/meta-greentouch \ 20 | ${TOPDIR}/meta-smartphone/meta-hp \ 21 | ${TOPDIR}/meta-smartphone/meta-huawei \ 22 | ${TOPDIR}/meta-smartphone/meta-lg \ 23 | ${TOPDIR}/meta-smartphone/meta-motorola \ 24 | ${TOPDIR}/meta-smartphone/meta-oneplus \ 25 | ${TOPDIR}/meta-smartphone/meta-xiaomi \ 26 | ${TOPDIR}/meta-smartphone/meta-android \ 27 | ${TOPDIR}/meta-smartphone/meta-mainline \ 28 | ${TOPDIR}/meta-smartphone/meta-qualcomm-modems \ 29 | ${TOPDIR}/meta-qt6 \ 30 | ${TOPDIR}/meta-clang \ 31 | ${TOPDIR}/meta-arm/meta-arm \ 32 | ${TOPDIR}/meta-arm/meta-arm-toolchain \ 33 | ${TOPDIR}/meta-rockchip \ 34 | ${TOPDIR}/meta-openembedded/meta-filesystems \ 35 | ${TOPDIR}/meta-openembedded/meta-multimedia \ 36 | ${TOPDIR}/meta-openembedded/meta-networking \ 37 | ${TOPDIR}/meta-openembedded/meta-python \ 38 | ${TOPDIR}/meta-openembedded/meta-oe \ 39 | ${TOPDIR}/openembedded-core/meta \ 40 | " 41 | 42 | -------------------------------------------------------------------------------- /conf/site.conf: -------------------------------------------------------------------------------- 1 | # 2 | # local.conf covers user settings, site.conf covers site specific information 3 | # such as proxy server addresses and optionally any shared download location 4 | # 5 | # SITE_CONF_VERSION is increased each time build/conf/site.conf 6 | # changes incompatibly 7 | SCONF_VERSION = "1" 8 | 9 | # Uncomment to cause CVS to use the proxy host specified 10 | #CVS_PROXY_HOST = "proxy.example.com" 11 | #CVS_PROXY_PORT = "81" 12 | 13 | # For svn, you need to create ~/.subversion/servers containing: 14 | #[global] 15 | #http-proxy-host = proxy.example.com 16 | #http-proxy-port = 81 17 | # 18 | 19 | # Uncomment to cause git to use the proxy host specificed 20 | # although this only works for http 21 | #GIT_PROXY_HOST = "proxy.example.com" 22 | #GIT_PROXY_PORT = "81" 23 | #export GIT_PROXY_COMMAND = "${POKYBASE}/scripts/poky-git-proxy-command" 24 | 25 | # GIT_PROXY_IGNORE_* lines define hosts which do not require a proxy to access 26 | #GIT_CORE_CONFIG = "Yes" 27 | #GIT_PROXY_IGNORE_1 = "host.server.com" 28 | #GIT_PROXY_IGNORE_2 = "another.server.com" 29 | 30 | # If SOCKS is available run the following command to comple a simple transport 31 | # gcc scripts/poky-git-proxy-socks.c -o poky-git-proxy-socks 32 | # and then share that binary somewhere in PATH, then use the following settings 33 | #GIT_PROXY_HOST = "proxy.example.com" 34 | #GIT_PROXY_PORT = "81" 35 | #export GIT_PROXY_COMMAND = "${POKYBASE}/scripts/poky-git-proxy-socks-command" 36 | 37 | 38 | # Uncomment this to use a shared download directory 39 | #DL_DIR = "/some/shared/download/directory/" 40 | -------------------------------------------------------------------------------- /scripts/staging_rebased_git_changelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # some branches in oe-core and meta-oe are rebased often 3 | # so to provide something like changelog we're saving 4 | # last "base" revision in .git/last_rev_in_up 5 | # and then listing commits prev_base..new_base 6 | # and then listing commits after new_base with rebase prefix 7 | 8 | if [[ $# -lt 2 ]] ; then 9 | echo "Usage: $0 git_repo branch base_repo_url [CHANGELOG_FORMAT] [CHANGELOG_FORMAT_REBASE]" 10 | exit 1 11 | fi 12 | 13 | GIT_REPO=$1 14 | BRANCH=$2 15 | BASE_REPO_URL=$3 16 | CHANGELOG_FORMAT="%h %ci %aN%n %s%n" 17 | CHANGELOG_FORMAT_REBASE="rebase: %h %ci %aN%n %s%n" 18 | 19 | if [[ $# -gt 4 ]] ; then 20 | CHANGELOG_FORMAT=$4 21 | if [[ $# -eq 5 ]] ; then 22 | CHANGELOG_FORMAT_REBASE=$5 23 | else 24 | echo "Usage: $0 git_repo branch base_repo_url [CHANGELOG_FORMAT] [CHANGELOG_FORMAT_REBASE]" 25 | exit 2 26 | fi 27 | fi 28 | 29 | if [[ ! -d ${GIT_REPO} ]] ; then 30 | echo "Git repository ${GIT_REPO} doesn't exist" 31 | echo 3 32 | fi 33 | 34 | cd ${GIT_REPO} 35 | 36 | # only when it succeeds we need to call git remote update *again*, otherwise we assume it was called before this script 37 | git remote add up ${BASE_REPO_URL} 2>/dev/null && git remote update 38 | 39 | PREV_REV_IN_UP=`cat .git/last_rev_in_up 2>/dev/null || echo up/master` 40 | NUMBER_OF_PATCHES_NOT_UP=`git rev-list up/master.. | wc -l` 41 | LAST_REV_IN_UP=`git show --oneline --format="%H" HEAD~${NUMBER_OF_PATCHES_NOT_UP} | head -n 1` 42 | echo ${LAST_REV_IN_UP} > .git/last_rev_in_up 43 | echo "git log ${PREV_REV_IN_UP}..${LAST_REV_IN_UP} --pretty=format:\"${CHANGELOG_FORMAT}\"" 44 | PAGER= git log ${PREV_REV_IN_UP}..${LAST_REV_IN_UP} --pretty=format:"${CHANGELOG_FORMAT}" 45 | echo "git log ${LAST_REV_IN_UP}..${BRANCH} --pretty=format:\"${CHANGELOG_FORMAT_REBASE}\"" 46 | PAGER= git log ${LAST_REV_IN_UP}..${BRANCH} --pretty=format:"${CHANGELOG_FORMAT_REBASE}" 47 | 48 | -------------------------------------------------------------------------------- /scripts/staging_new.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . scripts/staging_header.sh 4 | 5 | NEW=`expr ${CURRENT_STAGING} + 1 | awk '{ printf("%03d", $0) }'` 6 | DATE=`date` 7 | REMOTE=$1 8 | 9 | if [ -z "$REMOTE" ]; then 10 | echo "ERROR: you need to provide remote URL" 11 | exit 2 12 | fi 13 | 14 | echo "Closing ${STAGING_DIR}/${CURRENT_STAGING} and creating new ${STAGING_DIR}/${NEW}" 15 | echo "Closing testing feed number: ${CURRENT_STAGING}" | tee -a ${SOURCE_DIR}/info.${CURRENT_STAGING} 16 | echo "'''Status:''' Closed (${DATE}), ready for test" | tee -a ${SOURCE_DIR}/info.${CURRENT_STAGING} 17 | echo "${DATE}" | tee -a ${SOURCE_DIR}/info.${CURRENT_STAGING} 18 | 19 | # one more sync to be sure everything was uploaded and update info file 20 | scripts/staging_sync.sh ${SOURCE_DIR} ${REMOTE}:${STAGING_DIR}/wip 21 | 22 | ssh ${REMOTE} mv ${STAGING_DIR}/wip ${STAGING_DIR}/${CURRENT_STAGING} 23 | ssh ${REMOTE} mkdir ${STAGING_DIR}/wip 24 | ssh ${REMOTE} ln -snf ${CURRENT_STAGING} ${STAGING_DIR}/latest 25 | 26 | export TAG=webOS-ports/scarthgap/${CURRENT_STAGING}; 27 | [ -e scripts/oebb.sh ] && ( OE_SOURCE_DIR=${CURRENT_DIR}/${CURRENT_PROJECT} scripts/oebb.sh tag ${TAG} ) 28 | # only for dirs with possible r-w access 29 | for i in meta-webos-ports; do 30 | cd ${CURRENT_PROJECT}/$i; 31 | git push origin ${TAG}; 32 | cd -; 33 | done; 34 | cd ${CURRENT_PROJECT}/buildhistory; 35 | git tag -a -m "${TAG}" ${TAG}; 36 | git push origin ${TAG}; 37 | cd -; 38 | # cannot do this, because prservice is running on different host 39 | # cp ../PRservice/prserv.sqlite3 ~/web/shr-core-staging/${TAG}/prserv.sqlite3.${TAG} 40 | 41 | # move current source aside 42 | mv ${SOURCE_DIR} ${SOURCE_DIR}.${CURRENT_STAGING} 43 | mkdir -p ${SOURCE_DIR} 44 | ln -sf info.${NEW} ${SOURCE_DIR}/info 45 | echo ${NEW} > ${SOURCE_DIR}/info.id 46 | echo "Opening testing feed number: ${NEW}" | tee -a ${SOURCE_DIR}/info.${NEW} 47 | echo "'''Status:''' Building, '''NOT''' ready for test" | tee -a ${SOURCE_DIR}/info.${NEW} 48 | echo "${DATE}" | tee -a ${SOURCE_DIR}/info.${NEW} 49 | 50 | echo ${NEW} > ${CURRENT_STAGING_FILE} 51 | echo "Please update manually with staging_update.sh" 52 | -------------------------------------------------------------------------------- /setup-env: -------------------------------------------------------------------------------- 1 | # setup up the environment for a bitbake build. This is used 2 | # by the makefile and may also be directly sourced from an 3 | # interactive shell. The makefile uses 'env -i' to ensure 4 | # no variables are inherited apart from CCACHE_DISABLE and 5 | # CCACHE_DIR 6 | # 7 | # topdir must exist in the directory and define TOPDIR to 8 | # the full path name of the working directory 9 | . ./conf/topdir.conf 10 | test -e ./setup-local || echo "setup-local does not exist, please update your conf/auto.conf and copy setup-local from common directory" 11 | . ./setup-local 12 | test -n "$TOPDIR" -a -d "$TOPDIR" || { 13 | echo "environment: TOPDIR not defined" >&2 14 | return 15 | } 16 | 17 | # 18 | # the following must match the definitions in common/conf/site.conf 19 | test ! -d "${TOPDIR}/bitbake/bin" || export PATH="${TOPDIR}/bitbake/bin:${PATH}" 20 | test ! -d "${TOPDIR}/openembedded-core/scripts" || export PATH="${TOPDIR}/openembedded-core/scripts:${PATH}" 21 | 22 | # used in bitbake wrapper for pseudodone location 23 | export BUILDDIR="${TOPDIR}" 24 | 25 | export BB_ENV_PASSTHROUGH_ADDITIONS="MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD WEBOS_DISTRO_BUILD_ID" 26 | export LD_LIBRARY_PATH= 27 | export LANG=C 28 | export MACHINE 29 | export DISTRO 30 | # Required for Python 3 starting with Yocto Morty release 31 | export LC_ALL=en_US.utf8 32 | 33 | #NOTE: if you add export definitions here add them below too! 34 | # 35 | # unset the following (unnecessary for the makefile, but safe) 36 | unset LC_CTYPE 37 | unset CC 38 | unset CXX 39 | unset MFLAGS 40 | unset MAKEFLAGS 41 | unset MAKE_TARGET 42 | 43 | # be carefull with non-existent entries in BBPATH.. https://bugzilla.yoctoproject.org/show_bug.cgi?id=1709 44 | unset BBPATH 45 | # 46 | # make bb into a 'safe' bitbake 47 | alias bb-safe="env -i \ 48 | HOME='${HOME}' \ 49 | PYTHONPATH='${PYTHONPATH}' \ 50 | PATH='${PATH}' \ 51 | LD_LIBRARY_PATH='${LD_LIBRARY_PATH}' \ 52 | LANG='${LANG}' \ 53 | '${TOPDIR}/bitbake/bin/bitbake'" 54 | alias bb="bitbake" 55 | # 56 | # remove TOPDIR - not required 57 | unset TOPDIR 58 | 59 | if [ ${TERM:-dumb} = dumb ]; then 60 | export PS1='OE $MACHINE@$DISTRO \w \$ ' 61 | elif [ -n "${ZSH_VERSION}" ]; then 62 | export PS1=$'%{\e[1;32m%}OE $MACHINE@$DISTRO%{\e[1;34m%} %1d $%{\e[0m%} ' 63 | else 64 | export PS1='\[\033[01;32m\]OE $MACHINE@$DISTRO\[\033[01;34m\] \w \$\[\033[00m\] ' 65 | fi 66 | echo "Altered environment for ${MACHINE}@${DISTRO} development" 67 | -------------------------------------------------------------------------------- /scripts/update-manifest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import sys 5 | import argparse 6 | import json 7 | 8 | def update_change_manifest(path, release_name="", next_version=1): 9 | manifest = {} 10 | 11 | if os.path.exists(path): 12 | with open(path) as file: 13 | manifest_raw = file.read() 14 | if manifest_raw: 15 | manifest = json.loads(manifest_raw) 16 | 17 | manifest["manifestVersion"] = 2 18 | 19 | if manifest.has_key("changeLog"): 20 | changeLog = manifest["changeLog"] 21 | else: 22 | changeLog = [] 23 | 24 | for change in changeLog: 25 | if change["version"] > next_version: 26 | next_version = change["version"] 27 | elif change["version"] == next_version: 28 | next_version += 1 29 | 30 | new_change = {} 31 | new_change["version"] = next_version 32 | new_change["release_name"] = release_name 33 | new_change["changes"] = [] 34 | 35 | changeLog.append(new_change) 36 | manifest["changeLog"] = changeLog 37 | manifest["platformVersion"] = next_version 38 | 39 | with open(path, "w") as file: 40 | file.write(json.dumps(manifest, sort_keys=True, indent=4, separators=(',', ': '))) 41 | 42 | def update_device_manifest(path, machine, version, image, image_md5): 43 | manifest = {} 44 | 45 | if os.path.exists(path): 46 | with open(path) as file: 47 | manifest_raw = file.read() 48 | if manifest_raw: 49 | manifest = json.loads(manifest_raw) 50 | 51 | manifest["version"] = 1 52 | 53 | if not manifest.has_key(machine): 54 | manifest[machine] = {} 55 | 56 | if not manifest[machine].has_key(version): 57 | manifest[machine][version] = {} 58 | 59 | manifest[machine][version]["url"] = image 60 | manifest[machine][version]["md5"] = image_md5 61 | 62 | with open(path, "w") as file: 63 | file.write(json.dumps(manifest, sort_keys=True, indent=4, separators=(',', ': '))) 64 | 65 | if __name__ == '__main__': 66 | parser = argparse.ArgumentParser(description="manifest updater") 67 | parser.add_argument("manifest", metavar="MANIFEST") 68 | parser.add_argument("-r", "--release-name", default="") 69 | parser.add_argument("-n", "--next-version", type=int, default=1) 70 | parser.add_argument("-c", "--change-manifest", action="store_true", help="Update the change manifest (default)", default=True) 71 | parser.add_argument("-d", "--device-manifest", action="store_true", help="Update the device manifest") 72 | parser.add_argument("-v", "--version", help="Version to add a new image for", default="") 73 | parser.add_argument("-m", "--machine", help="Machine to add a new image for", default="") 74 | parser.add_argument("--image", help="Image to add for specified machine and version", default="") 75 | parser.add_argument("--image-md5", help="Image md5 checksum", default="") 76 | 77 | args = parser.parse_args() 78 | 79 | if args.change_manifest and not args.device_manifest: 80 | update_change_manifest(args.manifest, args.release_name, args.next_version) 81 | elif args.device_manifest: 82 | update_device_manifest(args.manifest, args.machine, args.version, args.image, args.image_md5) 83 | else: 84 | print "ERROR: Invalid argument combination!" 85 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for the webos-ports development system 2 | # Licensed under the GPL v2 or later 3 | 4 | MAKEFLAGS = -swr 5 | 6 | BRANCH_COMMON = scarthgap 7 | 8 | URL_COMMON = "https://github.com/webOS-ports/webos-ports-setup.git" 9 | 10 | UPDATE_CONFFILES_ENABLED = "0" 11 | RESET_ENABLED = "0" 12 | 13 | SETUP_DIR = "webos-ports" 14 | 15 | ifneq ($(wildcard config.mk),) 16 | include config.mk 17 | endif 18 | 19 | .PHONY: show-config 20 | show-config: 21 | @echo "BRANCH_COMMON ${BRANCH_COMMON}" 22 | @echo "URL_COMMON ${URL_COMMON}" 23 | @echo "" 24 | 25 | .PHONY: update 26 | update: 27 | if [ "${CHANGELOG_ENABLED}" = "1" ] ; then \ 28 | ${MAKE} changelog ; \ 29 | fi 30 | [ ! -e common ] || ${MAKE} update-common 31 | if [ "${UPDATE_CONFFILES_ENABLED}" = "1" ] ; then \ 32 | ${MAKE} update-conffiles ; \ 33 | fi 34 | if [ -d ${SETUP_DIR} ] ; then \ 35 | if ! diff -q ${SETUP_DIR}/conf/bblayers.conf common/conf/bblayers.conf ; then \ 36 | echo -e "\\033[1;31mWARNING: You have different bblayers.conf.\\n Please sync it from common directory or call update-conffiles to replace all config files with new versions.\\e[0m"; \ 37 | fi ; \ 38 | if ! diff -q ${SETUP_DIR}/conf/layers.txt common/conf/layers.txt; then \ 39 | echo -e "\\033[1;31mWARNING: You have different layers.txt.\\n Please sync it from common directory or call update-conffiles to replace all config files with new versions.\\e[0m"; \ 40 | fi ; \ 41 | if ! diff -q ${SETUP_DIR}/conf/site.conf common/conf/site.conf; then \ 42 | echo -e "\\033[1;31mWARNING: You have different site.conf\\n Please sync it from common directory or call update-conffiles to replace all config files with new versions.\\e[0m"; \ 43 | fi ; \ 44 | [ -e scripts/oebb.sh ] && ( OE_SOURCE_DIR=`pwd`/${SETUP_DIR} scripts/oebb.sh update ) ; \ 45 | if [ "${RESET_ENABLED}" = "1" ] ; then \ 46 | [ -e scripts/oebb.sh ] && ( OE_SOURCE_DIR=`pwd`/${SETUP_DIR} scripts/oebb.sh reset ) ; \ 47 | fi; \ 48 | fi 49 | 50 | .PHONY: setup-common 51 | .PRECIOUS: common/.git/config 52 | setup-common common/.git/config: 53 | [ -e common/.git/config ] || \ 54 | ( echo "setting up common (Makefile)"; \ 55 | git clone ${URL_COMMON} common && \ 56 | rm -f Makefile && \ 57 | ln -s common/Makefile Makefile ) 58 | ( cd common && \ 59 | git checkout ${BRANCH_COMMON} 2>/dev/null || \ 60 | git checkout --no-track -b ${BRANCH_COMMON} origin/${BRANCH_COMMON} ) 61 | touch common/.git/config 62 | 63 | .PHONY: setup-% 64 | setup-%: 65 | ${MAKE} $*/.configured 66 | 67 | .PRECIOUS: webos-ports/.configured 68 | webos-ports/.configured: common/.git/config 69 | @echo "preparing ${SETUP_DIR} tree" 70 | [ -d ${SETUP_DIR} ] || ( mkdir -p ${SETUP_DIR} ) 71 | [ -e downloads ] || ( mkdir -p downloads ) 72 | [ -d scripts ] || ( cp -ra common/scripts scripts ) 73 | [ -e ${SETUP_DIR}/setup-env ] || ( cd ${SETUP_DIR} ; ln -sf ../common/setup-env . ) 74 | [ -e ${SETUP_DIR}/setup-local ] || ( cd ${SETUP_DIR} ; cp ../common/setup-local . ) 75 | [ -e ${SETUP_DIR}/downloads ] || ( cd ${SETUP_DIR} ; ln -sf ../downloads . ) 76 | [ -d ${SETUP_DIR}/conf ] || ( cp -ra common/conf ${SETUP_DIR}/conf ) 77 | [ -e ${SETUP_DIR}/conf/topdir.conf ] || echo "TOPDIR='`pwd`/${SETUP_DIR}'" > ${SETUP_DIR}/conf/topdir.conf 78 | [ -e scripts/oebb.sh ] && ( OE_SOURCE_DIR=`pwd`/${SETUP_DIR} scripts/oebb.sh update ) 79 | touch ${SETUP_DIR}/.configured 80 | 81 | .PHONY: update-common 82 | update-common: common/.git/config 83 | @echo "updating common (Makefile)" 84 | ( cd common ; \ 85 | git clean -d -f ; git reset --hard ; git fetch ; \ 86 | git checkout ${BRANCH_COMMON} 2>/dev/null || \ 87 | git checkout --no-track -b ${BRANCH_COMMON} origin/${BRANCH_COMMON} ; \ 88 | git reset --hard origin/${BRANCH_COMMON}; \ 89 | ) 90 | ( echo "replacing Makefile with link to common/Makefile"; \ 91 | rm -f Makefile && \ 92 | ln -s common/Makefile Makefile ) 93 | 94 | .PHONY: update-conffiles 95 | update-conffiles: 96 | [ -d ${SETUP_DIR}/conf ] && ( \ 97 | echo "syncing ${SETUP_DIR} config files up to date"; \ 98 | cp common/conf/auto.conf ${SETUP_DIR}/conf/auto.conf; \ 99 | cp common/conf/bblayers.conf ${SETUP_DIR}/conf/bblayers.conf; \ 100 | cp common/conf/layers.txt ${SETUP_DIR}/conf/layers.txt; \ 101 | cp common/conf/site.conf ${SETUP_DIR}/conf/site.conf; \ 102 | cp common/scripts/* scripts/; \ 103 | ) 104 | 105 | # End of Makefile 106 | -------------------------------------------------------------------------------- /scripts/layerman: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LAYERNAME=$1 4 | LAYERURI=$2 5 | BRANCH=$3 6 | REV=$4 7 | COMMAND=$5 8 | COMMANDARG=$6 9 | 10 | LAYERDIR="${OE_SOURCE_DIR}/${LAYERNAME}" 11 | 12 | LAYERINFO="layer repository name: ${LAYERNAME}\nlayer uri: ${LAYERURI}\nlayer branch/revision: ${BRANCH}/${REV}\n" 13 | 14 | function check_layer() { 15 | if ! [ -e ${LAYERDIR} ] ; then 16 | echo -e ${LAYERINFO} 17 | echo "Layer checkout missing at ${LAYERDIR}, creating one" 18 | git clone ${LAYERURI} ${LAYERDIR} 19 | cd ${LAYERDIR} 20 | 21 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 22 | if [ "${BRANCH}" != "${CURRENTBRANCH}" ] ; then 23 | git checkout origin/${BRANCH} -b ${BRANCH} 24 | fi 25 | 26 | if [ "${REV}" != "HEAD" ] ; then 27 | git reset --hard ${REV} 28 | fi 29 | 30 | echo "Layers present in repository:" 31 | find ${LAYERDIR} -name "layer.conf" | sed -e s:${LAYERDIR}:${LAYERNAME}:g -e s:/conf/layer\.conf::g 32 | echo 33 | 34 | else 35 | cd ${LAYERDIR} 36 | CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')" 37 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 38 | CURRENTURI="$(git config remote.origin.url)" 39 | 40 | if [ "${CURRENTURI}" != "${LAYERURI}" ] ; then 41 | echo "WARNING!!!!" 42 | echo "WARNING: ${LAYERNAME} is using a different uri '${CURRENTURI}' than configured in layers.txt '${LAYERURI}'" 43 | echo "WARNING: Changing uri to: '${LAYERURI}'" 44 | echo "WARNING!!!!" 45 | git remote set-url origin ${LAYERURI} 46 | git remote update 47 | fi 48 | if [ "${CURRENTBRANCH}" != "${BRANCH}" ] ; then 49 | #echo -e ${LAYERINFO} 50 | echo "WARNING!!!!" 51 | echo "WARNING: ${LAYERNAME} is using a different branch than configured in layers.txt, detected ${CURRENTBRANCH} instead of ${BRANCH}" 52 | echo "WARNING: Changing branch to: '${BRANCH}'" 53 | echo "WARNING!!!!" 54 | git remote update 55 | git checkout origin/${BRANCH} -b ${BRANCH} >/dev/null || git checkout ${BRANCH} 56 | fi 57 | fi 58 | } 59 | 60 | 61 | function get_info() { 62 | check_layer 63 | 64 | cd ${LAYERDIR} 65 | CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')" 66 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 67 | 68 | echo "${LAYERNAME},${LAYERURI},${CURRENTBRANCH},${CURRENTCOMMIT}" >> ${OE_SOURCE_DIR}/info.txt 69 | } 70 | 71 | function update_layers() { 72 | check_layer 73 | 74 | echo -n "Processing ${LAYERNAME}: " 75 | 76 | if [ "${REV}" = "HEAD" ] ; then 77 | cd ${LAYERDIR} || exit 1 78 | git stash >&/dev/null && git pull --rebase && git stash pop >& /dev/null 79 | else 80 | cd ${LAYERDIR} || exit 1 81 | CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')" 82 | CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')" 83 | 84 | if [ "${BRANCH}" != "${CURRENTBRANCH}" ] ; then 85 | if [ "${REV}" != "${CURRENTCOMMIT}" ] ; then 86 | echo "WARNING!!!!" 87 | echo "WARNING: ${LAYERNAME} is using a different revision and branch than configured in layers.txt" 88 | echo "WARNING!!!!" 89 | fi 90 | else 91 | if [ "${REV}" != "${CURRENTCOMMIT}" ] ; then 92 | git remote update 93 | git fetch --tags 94 | echo "updating to ${REV}" 95 | git stash >&/dev/null && git reset --hard ${REV} && git stash pop >& /dev/null 96 | else 97 | echo "Fixed to revision ${REV}, skipping update" 98 | fi 99 | fi 100 | fi 101 | } 102 | 103 | function tag_layers() { 104 | check_layer 105 | cd ${LAYERDIR} && echo "Tagging layer with $COMMANDARG" && git tag $COMMANDARG 106 | echo "" 107 | } 108 | 109 | function reset_layers() { 110 | check_layer 111 | if [ -e ${LAYERDIR} ] ; then 112 | echo "WARNING!!!!: ${LAYERNAME}: Removing local changes including stash and ignored files!!" 113 | # abort rebase if git pull --rebase from update_layers got stuck on some local commit 114 | git rebase --abort 2>/dev/null || true 115 | git stash clear 116 | git clean -fdx | grep -v "\.pyc$" 117 | if [ "${REV}" != "HEAD" ] ; then 118 | git reset --hard ${REV} 119 | else 120 | git reset --hard origin/${BRANCH} 121 | fi 122 | fi 123 | echo "" 124 | } 125 | 126 | function diff_tags() { 127 | check_layer 128 | cd ${LAYERDIR} && echo "Changes in between $COMMANDARG" && git shortlog $COMMANDARG 129 | echo "" 130 | } 131 | 132 | function checkout_tag() { 133 | check_layer 134 | cd ${LAYERDIR} && echo "Checking out $COMMANDARG" && git checkout $COMMANDARG 135 | echo "" 136 | } 137 | 138 | case $COMMAND in 139 | tag) 140 | tag_layers;; 141 | reset) 142 | reset_layers;; 143 | changelog) 144 | diff_tags;; 145 | info) 146 | get_info;; 147 | checkout) 148 | checkout_tag;; 149 | *) 150 | update_layers;; 151 | esac 152 | -------------------------------------------------------------------------------- /scripts/oebb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Original script done by Don Darling 4 | # Later changes by Koen Kooi and Brijesh Singh 5 | 6 | # Revision history: 7 | # 20090902: download from twiki 8 | # 20090903: Weakly assign MACHINE and DISTRO 9 | # 20090904: * Don't recreate local.conf is it already exists 10 | # * Pass 'unknown' machines to OE directly 11 | # 20090918: Fix /bin/env location 12 | # Don't pass MACHINE via env if it's not set 13 | # Changed 'build' to 'bitbake' to prepare people for non-scripted usage 14 | # Print bitbake command it executes 15 | # 20091012: Add argument to accept commit id. 16 | # 20091202: Fix proxy setup 17 | # 20120813: minimal version just to checkout/update/changelog layers from layers.txt, used by webos scripts instead of git submodules 18 | # 19 | # For further changes consult 'git log' or browse to: 20 | # http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/setup-scripts/ 21 | # to see the latest revision history 22 | 23 | # Use this till we get a maintenance branch based of the release tag 24 | 25 | ############################################################################### 26 | # OE_BASE - The root directory for all OE sources and development. 27 | ############################################################################### 28 | OE_BASE=${PWD} 29 | 30 | ############################################################################### 31 | # SET_ENVIRONMENT() - Setup environment variables for OE development 32 | ############################################################################### 33 | function set_environment() 34 | { 35 | export OE_BASE 36 | export OE_LAYERS_TXT=${OE_SOURCE_DIR}/conf/layers.txt 37 | } 38 | 39 | ############################################################################### 40 | # UPDATE_ALL() - Make sure everything is up to date 41 | ############################################################################### 42 | function update_all() 43 | { 44 | set_environment 45 | update_oe 46 | } 47 | 48 | ############################################################################### 49 | # CLEAN_OE() - Delete TMPDIR 50 | ############################################################################### 51 | function clean_oe() 52 | { 53 | set_environment 54 | echo "Cleaning ${OE_BUILD_TMPDIR}" 55 | rm -rf ${OE_BUILD_TMPDIR} 56 | } 57 | 58 | 59 | ############################################################################### 60 | # UPDATE_OE() - Update OpenEmbedded distribution. 61 | ############################################################################### 62 | function update_oe() 63 | { 64 | #manage layers with layerman 65 | env gawk -v command=update -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 66 | } 67 | 68 | ############################################################################### 69 | # tag_layers - Tag all layers with a given tag 70 | ############################################################################### 71 | function tag_layers() 72 | { 73 | set_environment 74 | env gawk -v command=tag -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 75 | echo $TAG >> ${OE_BASE}/tags 76 | } 77 | 78 | ############################################################################### 79 | # reset_layers - Remove all local changes including stash and ignored files 80 | ############################################################################### 81 | function reset_layers() 82 | { 83 | set_environment 84 | env gawk -v command=reset -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 85 | } 86 | 87 | ############################################################################### 88 | # changelog - Display changelog for all layers with a given tag 89 | ############################################################################### 90 | function changelog() 91 | { 92 | set_environment 93 | env gawk -v command=changelog -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 94 | } 95 | 96 | ############################################################################### 97 | # layer_info - Get layer info 98 | ############################################################################### 99 | function layer_info() 100 | { 101 | set_environment 102 | rm -f ${OE_SOURCE_DIR}/info.txt 103 | env gawk -v command=info -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 104 | echo 105 | echo "Showing contents of ${OE_SOURCE_DIR}/info.txt:" 106 | echo 107 | cat ${OE_SOURCE_DIR}/info.txt 108 | echo 109 | } 110 | 111 | ############################################################################### 112 | # checkout - Checkout all layers with a given tag 113 | ############################################################################### 114 | function checkout() 115 | { 116 | set_environment 117 | env gawk -v command=checkout -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT} 118 | } 119 | 120 | 121 | ############################################################################### 122 | # Build the specified OE packages or images. 123 | ############################################################################### 124 | 125 | # FIXME: convert to case/esac 126 | 127 | if [ $# -gt 0 ] 128 | then 129 | if [ $1 = "update" ] 130 | then 131 | update_all 132 | exit 0 133 | fi 134 | 135 | if [ $1 = "info" ] 136 | then 137 | layer_info 138 | exit 0 139 | fi 140 | 141 | if [ $1 = "reset" ] 142 | then 143 | reset_layers 144 | exit 0 145 | fi 146 | 147 | if [ $1 = "tag" ] 148 | then 149 | if [ -n "$2" ] ; then 150 | TAG="$2" 151 | else 152 | TAG="$(date -u +'%Y%m%d-%H%M')" 153 | fi 154 | tag_layers $TAG 155 | exit 0 156 | fi 157 | 158 | if [ $1 = "changelog" ] 159 | then 160 | if [ -z $2 ] ; then 161 | echo "Changelog needs an argument" 162 | exit 1 163 | else 164 | TAG="$2" 165 | fi 166 | changelog 167 | exit 0 168 | fi 169 | 170 | if [ $1 = "checkout" ] 171 | then 172 | if [ -z $2 ] ; then 173 | echo "Checkout needs an argument" 174 | exit 1 175 | else 176 | TAG="$2" 177 | fi 178 | checkout 179 | exit 0 180 | fi 181 | 182 | if [ $1 = "clean" ] 183 | then 184 | clean_oe 185 | exit 0 186 | fi 187 | fi 188 | 189 | # Help Screen 190 | echo "" 191 | echo "Usage: $0 update" 192 | echo " $0 reset" 193 | echo " $0 tag [tagname]" 194 | echo " $0 changelog " 195 | echo " $0 checkout " 196 | echo " $0 clean" 197 | --------------------------------------------------------------------------------