feat: set terminal title
This commit is contained in:
9
leaf
9
leaf
@@ -34,7 +34,12 @@ BUILD_OPTIONS=([strip]="0" [libtool]="0" [zipman]="0")
|
||||
# global message file list
|
||||
declare -a LEAF_MESSAGE_FILES=()
|
||||
|
||||
leaf_set_title() {
|
||||
printf '\e]2;%s\a' "$*"
|
||||
}
|
||||
|
||||
main() {
|
||||
leaf_set_title "leaf"
|
||||
leaf_check_directories
|
||||
if [ $# -le 1 ]; then
|
||||
case $1 in
|
||||
@@ -252,6 +257,7 @@ leaf_invoke_hooks() {
|
||||
|
||||
leaf_merge_package() {
|
||||
pushd $1 > /dev/null 2>&1
|
||||
leaf_set_title "leaf: ${PKG_PREFIX}/${PKG_NAME} (Merging)"
|
||||
local _trace_dir="${TRACE_DIR}/${PKG_PREFIX}/${PKG_NAME}"
|
||||
local _item _item_conflict _mode _owner _group
|
||||
local _time="$(date +%Y%m%d%H%M%S)"
|
||||
@@ -589,6 +595,7 @@ leaf_run_phase() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
leaf_set_title "leaf: ${PKG_PREFIX}/${PKG_NAME} (${phase})"
|
||||
echo -e "${GREEN_COLOR}>>> ${PKG_PREFIX}/${PKG_NAME}: ${phase}${CLEAR_COLOR}"
|
||||
|
||||
set +e
|
||||
@@ -621,6 +628,8 @@ leaf_prepare_package() {
|
||||
local checksum_algo checksum_arr_name
|
||||
local decl
|
||||
|
||||
leaf_set_title "leaf: ${PKG_PREFIX}/${PKG_NAME} (Fetching)"
|
||||
|
||||
distdir="${DIST_DIR}"
|
||||
filedir="${PKGBUILD_DIR}/${PKG_PREFIX}/${pkgname}"
|
||||
mkdir -pv -- "${distdir}"
|
||||
|
||||
Reference in New Issue
Block a user