parent
cdac55a90b
commit
2eb03cf863
1 changed files with 20 additions and 15 deletions
35
cd.sh
35
cd.sh
|
@ -573,15 +573,19 @@ ${CD_PYTHON_PACKAGES}
|
|||
cd_write_python_module () {
|
||||
cd_step "Write Python module"
|
||||
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
|
||||
$(cd_echo CD_OS_ID CD_OS_VERSION)
|
||||
|
||||
STEP = ${CD_STEP}
|
||||
|
||||
|
||||
$(cd_echo CD_OS_ID CD_OS_VERSION)
|
||||
def open(*arguments):
|
||||
print('${CD_OPEN}', end=str())
|
||||
print(*arguments, flush=True)
|
||||
|
||||
|
||||
$(cd_echo CD_OPEN CD_SHUT)
|
||||
|
||||
$(cd_echo CD_HORIZONTAL)
|
||||
def shut(*arguments):
|
||||
print('${CD_SHUT}', end=str())
|
||||
print(*arguments, flush=True)
|
||||
|
||||
|
||||
def split():
|
||||
|
@ -611,18 +615,11 @@ ${CD_GIT_CHILD}
|
|||
|
||||
# functions
|
||||
|
||||
cd_box_open () {
|
||||
echo "${CD_OPEN}${@}"
|
||||
}
|
||||
cd_box_shut () {
|
||||
echo "${CD_SHUT}${@}"
|
||||
}
|
||||
|
||||
cd_cat () {
|
||||
if [ -f "${1}" ] ; then
|
||||
cd_box_open "${1}"
|
||||
cd_open "${1}"
|
||||
cat "${1}" || exit
|
||||
cd_box_shut "${1}"
|
||||
cd_shut "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -672,9 +669,9 @@ local command="${1}"
|
|||
|
||||
cd_ls () {
|
||||
if [ -d "${1}" ] ; then
|
||||
cd_box_open "${1}"
|
||||
cd_open "${1}"
|
||||
ls -a -l "${1}" || exit
|
||||
cd_box_shut "${1}"
|
||||
cd_shut "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -685,6 +682,10 @@ cd_mkdir () {
|
|||
fi
|
||||
}
|
||||
|
||||
cd_open () {
|
||||
echo "${CD_OPEN}${@}"
|
||||
}
|
||||
|
||||
cd_openssl () {
|
||||
local file="${1}"
|
||||
if [ -f "${file}" ] ; then
|
||||
|
@ -714,6 +715,10 @@ shift
|
|||
fi
|
||||
}
|
||||
|
||||
cd_shut () {
|
||||
echo "${CD_SHUT}${@}"
|
||||
}
|
||||
|
||||
cd_split () {
|
||||
echo "${CD_SPLIT}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue