<commit_before>#!/bin/bash

if [ -z ${BOARD} ]; then
	echo "[ERROR] Please set BOARD".
	exit
fi

# スクリプトをtarにまとめる。このとき、ディレクトリmyscript-1配下にスクリプトが置かれるようにする
pushd . > /dev/null
copydir=~/myenv/addpackages/tarballs/myscript-1
if [ -e ${copydir} ]; then
	rm -rf ${copydir}
fi
mkdir ${copydir}
cp -R ../script_dev/* ${copydir}

cd ${copydir}/..
tar zcvf myscript.tar.gz ./myscript-1
if [ 0 -ne $? ]; then
	echo "[ERROR]Create tar failed. Abort."
	exit
fi


# 作成したtar.gzをキャッシュディレクトリに置く
cp myscript.tar.gz /var/cache/chromeos-cache/distfiles/target/
if [ 0 -ne $? ]; then
	echo "[ERROR]copy tar to cache dir failed. Abort."
	exit
fi


# ebuildを所定の場所に置く
cd ../ebuilds/app-misc
tar cvf - myscript | (cd ~/trunk/src/third_party/portage-stable/app-misc; tar xf -)
if [ 0 -ne $? ]; then
	echo "[ERROR]copy ebuild to portage-stable failed. Abort."
	exit
fi

# portageのパッケージ展開先をクリアしておく
portage_workdir=/build/${BOARD}/tmp/portage/app-misc/myscript-1
if [ -e ${portage_workdir} ]; then
	sudo rm -rf ${portage_workdir}
fi

# ebuildのテストを実行する
cd ~/trunk/src/third_party/portage-stable/app-misc/myscript
rm -f Manifest
ebuild-${BOARD} myscript-1.ebuild manifest
ebuild-${BOARD} myscript-1.ebuild test
emerge-${BOARD} app-misc/myscript --pretend --verbose


popd > /dev/null
<commit_msg>* myscriptをtarでまとめる際のディレクトリ名をmyscript-1からmyscriptに変更。 * 依存関係の登録処理を追加<commit_after>#!/bin/bash

source ./revisionup_ebuild.sh

if [ -z ${BOARD} ]; then
	echo "[ERROR] Please set BOARD".
	exit
fi

# スクリプトをtarにまとめる。このとき、ディレクトリmyscript配下にスクリプトが置かれるようにする
pushd . > /dev/null
#copydir=~/myenv/addpackages/tarballs/myscript-1
copydir=~/myenv/addpackages/tarballs/myscript
if [ -e ${copydir} ]; then
	rm -rf ${copydir}
fi
mkdir ${copydir}
cp -R ../script_dev/* ${copydir}

cd ${copydir}/..
#tar zcvf myscript.tar.gz ./myscript-1
tar zcvf myscript.tar.gz ./myscript
if [ 0 -ne $? ]; then
	echo "[ERROR]Create tar failed. Abort."
	exit
fi


# 作成したtar.gzをキャッシュディレクトリに置く
cp myscript.tar.gz /var/cache/chromeos-cache/distfiles/target/
if [ 0 -ne $? ]; then
	echo "[ERROR]copy tar to cache dir failed. Abort."
	exit
fi


# ebuildを所定の場所に置く
cd ../ebuilds/app-misc
tar cvf - myscript | (cd ~/trunk/src/third_party/portage-stable/app-misc; tar xf -)
if [ 0 -ne $? ]; then
	echo "[ERROR]copy ebuild to portage-stable failed. Abort."
	exit
fi

# portageのパッケージ展開先をクリアしておく
portage_workdir=/build/${BOARD}/tmp/portage/app-misc/myscript-1
if [ -e ${portage_workdir} ]; then
	sudo rm -rf ${portage_workdir}
fi

# ebuildのテストを実行する
cd ~/trunk/src/third_party/portage-stable/app-misc/myscript
rm -f Manifest
ebuild-${BOARD} myscript-1.ebuild manifest
ebuild-${BOARD} myscript-1.ebuild test
emerge-${BOARD} app-misc/myscript --pretend --verbose


# 依存関係を追加
cd ~/trunk/src/third_party/chromiumos-overlay/virtual/target-chromium-os-dev
search=`grep 'myscript' target-chromium-os-dev-1.ebuild`
if [ -z "${search}" ]; then
        echo myscript is not included in dev overlay. append to dev overlay now.
        sed -e '/^RDEPEND="${RDEPEND}/a \\tapp-misc\/myscript' -i target-chromium-os-dev-1.ebuild || exit 1
        echo done
        revisionup_ebuild
else
        echo myscript is already included in dev overlay. skip.
fi
popd > /dev/null

{'fraction_non_alphanumeric': 0.1476235442241108, 'fraction_numerical': 0.0066100094428706326, 'mean_word_length': 3.7717717717717716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7466286', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1378, 'n_words': 288}