Compare commits

..

3 Commits

Author SHA1 Message Date
a12d0a4778 buildiso: default to 'default' tree name 2021-06-05 16:04:09 +02:00
4293f5a967 Merge pull request 'commitpkg: adjust msg' (#52) from msg into master
Reviewed-on: #52
2021-06-01 19:27:33 +02:00
d3e42f60e1 commitpkg: adjust msg 2021-05-30 19:43:51 +02:00
2 changed files with 17 additions and 18 deletions

View File

@@ -49,7 +49,7 @@ subrepo_pull(){
prepare_commit(){
# create new layout, copy & remove repos
if [[ -d repos ]]; then
msg "Switching to new layout ..."
msg2 "Switching to new layout ..."
[[ ! -d "$CARCH" ]] && mkdir "$CARCH"
for r in repos/*; do
@@ -63,7 +63,7 @@ prepare_commit(){
git rm -r repos
git commit -m "switch to new repo layout"
msg "Done switch"
msg2 "Done switch"
fi
if [[ $action == 'add' ]] || [[ $action == 'move' ]] ;then
@@ -87,7 +87,7 @@ check_rebuild(){
check_team(){
if [[ "${repo_src}" == "${valid_names[0]}" \
&& "${repo_dest}" == "${valid_names[1]}" ]] || \
&& "${repo_dest}" == "${valid_names[1]}" ]] || \
[[ "${repo_src}" == "${valid_names[1]}" \
&& "${repo_dest}" == "${valid_names[0]}" ]] || \
[[ "${repo_src}" == "${valid_names[1]}" \
@@ -115,22 +115,24 @@ path_config() {
. "$pkgbuild"
}
get_commit_msg() {
echo "[${repo_src}] -> [${repo_dest}] '${package}-$(get_full_version)' ${action}"
}
commit_pkg() {
local commit_msg pkg
if ${remove};then
if ${remove}; then
action='remove'
commit_msg="[${repo_src}] '$pkg' ${action}"
msg "Action: %s" "$commit_msg"
if [[ "${repo_src}" == 'trunk' ]];then
pkg=${package}
git rm -r trunk
else
pkg="${package}-$(get_full_version)"
prepare_commit
git rm -r "$CARCH/${repo_src}"
fi
commit_msg="[${repo_src}] '$pkg' ${action}"
msg "Action: %s" "$commit_msg"
else
action='modify'
commit_msg="[${repo_src}] '${package}-$(get_full_version)' ${action}"
@@ -142,25 +144,22 @@ commit_pkg() {
repo_commit_pkg() {
local commit_msg
if [[ "${repo_src}" == 'trunk' ]];then
if [[ "${repo_src}" == 'trunk' ]]; then
action='add'
commit_msg=$(get_commit_msg)
msg "Action: %s" "$commit_msg"
prepare_commit
check_rebuild
cp trunk/* "$CARCH/${repo_dest}"/
else
action='move'
[[ ! -f $pkgbuild ]] && die "%s does not exist!" "$pkgbuild"
commit_msg=$(get_commit_msg)
msg "Action: %s" "$commit_msg"
prepare_commit
cp "$CARCH/${repo_src}"/* "$CARCH/${repo_dest}"/
git rm -r "$CARCH/${repo_src}"
fi
commit_msg="[${repo_src}] -> [${repo_dest}] '${package}-$(get_full_version)' ${action}"
msg "Action: %s" "$commit_msg"
git add .
git commit -m "$commit_msg"
}

View File

@@ -45,11 +45,11 @@ add_svc_s6(){
add_svc_66(){
local mnt="$1" names="$2"
chroot "$mnt" 66-tree -cnE root &>/dev/null
chroot "$mnt" 66-tree -cnE default &>/dev/null
for svc in $names; do
if [[ -f "$mnt"/etc/66/service/"$svc" ]]; then
msg2 "Setting %s: [%s]" "${INITSYS}" "$svc"
chroot "$mnt" 66-enable -t root "$svc" &>/dev/null
chroot "$mnt" 66-enable -t default "$svc" &>/dev/null
fi
done
}