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