Added push() and pop() functions

This commit is contained in:
2025-09-23 18:08:30 +01:00
parent 6c5c878e9a
commit a49ad4b9b1
2 changed files with 34 additions and 4 deletions

2
.gitignore vendored
View File

@@ -13,3 +13,5 @@ staging
Prototype Prototype
pkginfo pkginfo
pkg pkg
packages
distfiles

View File

@@ -24,10 +24,38 @@ OPT_CLEAN=0
#hook_git_clone_pre() { push() {
#} DIR="$1"
#hook_git_clone_post() {
#} PREVDIR_10="${PREVDIR_9}"
PREVDIR_9="${PREVDIR_8}"
PREVDIR_8="${PREVDIR_7}"
PREVDIR_7="${PREVDIR_6}"
PREVDIR_6="${PREVDIR_5}"
PREVDIR_5="${PREVDIR_4}"
PREVDIR_4="${PREVDIR_3}"
PREVDIR_3="${PREVDIR_2}"
PREVDIR_2="${PREVDIR_1}"
PREVDIR_1="${PREVDIR}"
PREVDIR="`pwd`"
cd "${DIR}"
}
pop() {
cd "${PREVDIR}"
PREVDIR="${PREVDIR_1}"
PREVDIR_1="${PREVDIR_2}"
PREVDIR_2="${PREVDIR_3}"
PREVDIR_3="${PREVDIR_4}"
PREVDIR_4="${PREVDIR_5}"
PREVDIR_5="${PREVDIR_6}"
PREVDIR_6="${PREVDIR_7}"
PREVDIR_7="${PREVDIR_8}"
PREVDIR_8="${PREVDIR_9}"
PREVDIR_9="${PREVDIR_10}"
}
hook() { hook() {
FN="hook_$1" FN="hook_$1"