Compare commits

..

7 commits

Author SHA1 Message Date
c095fe57a2
fix
All checks were successful
/ job (push) Successful in 1m20s
2024-06-05 12:47:00 +02:00
27a9b419d9
open,shut 2024-06-05 12:45:54 +02:00
c1eaf978d7
useless 2024-06-05 11:55:25 +02:00
5c9f50edfa
vertical 2024-06-05 11:54:36 +02:00
d6f00d6945
py/split 2024-06-05 11:45:41 +02:00
916b7a56cd
py/step 2024-06-05 11:41:47 +02:00
4fc693a17e
useless 2024-06-05 11:32:25 +02:00
3 changed files with 35 additions and 40 deletions

36
cd.sh
View file

@ -573,30 +573,17 @@ ${CD_PYTHON_PACKAGES}
cd_write_python_module () {
cd_step "Write Python module"
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
CD_STEP = ${CD_STEP}
$(cd_echo CD_DOWN CD_VERTICAL CD_UP)
$(cd_echo CD_OPEN CD_SHUT)
$(cd_echo CD_SPLIT)
$(cd_echo CD_OS_ID CD_OS_VERSION)
STEP = ${CD_STEP}
def open(*arguments):
print('${CD_OPEN}', end=str())
print(*arguments, flush=True)
def shut(*arguments):
print('${CD_SHUT}', end=str())
print(*arguments, flush=True)
def split():
print('${CD_SPLIT}', flush=True)
def step(*arguments):
STEP += 1
print('${CD_DOWN}')
print('${CD_BOX_VERTICAL}', STEP, *arguments)
print('${CD_UP}', flush=True)
"
}
@ -727,7 +714,7 @@ cd_step () {
CD_STEP=$((CD_STEP+1))
echo -n "\
${CD_DOWN}
${CD_BOX_VERTICAL} ${CD_STEP} ${@}
${CD_VERTICAL} ${CD_STEP} ${@}
${CD_UP}
"
}
@ -772,6 +759,7 @@ CD_OPEN="${CD_BOX_DOWN}${CD_BOX_LEFT}"
CD_SHUT="${CD_BOX_UP}${CD_BOX_LEFT}"
CD_HORIZONTAL="${CD_BOX_HORIZONTAL}╌╌┄┄┈┈"
CD_VERTICAL="${CD_BOX_VERTICAL}"
CD_DOWN="${CD_BOX_DOWN}${CD_HORIZONTAL}"
CD_SPLIT="${CD_BOX_RIGHT}${CD_HORIZONTAL}"

View file

@ -90,7 +90,8 @@ def install_commands(path):
def set_ssh(*arguments):
ssh_key, ssh_hosts = arguments
ssh_type = projects.environment.get('CD_SSH_TYPE', 'ed25519')
#
ssh_type = 'ed25519'
#
home = os.path.expanduser('~')
#
@ -107,3 +108,24 @@ def set_ssh(*arguments):
if ssh_hosts:
fs.write(known, ssh_hosts)
os.chmod(known, 0o400)
def open(*arguments):
print(env.CD_OPEN, end=str())
print(*arguments, flush=True)
def shut(*arguments):
print(env.CD_SHUT, end=str())
print(*arguments, flush=True)
def split():
print(env.CD_SPLIT, flush=True)
def step(*arguments):
env.CD_STEP += 1
print(env.CD_DOWN)
print(env.CD_VERTICAL, env.CD_STEP, *arguments)
print(env.CD_UP, flush=True)

View file

@ -1,15 +0,0 @@
[ "${1}" ] && REPOSITORY_FULL="${1}" || exit
REPOSITORY_NAME="$(basename ${REPOSITORY_FULL})"
REPOSITORY_TEMP="$(mktemp --directory)"
git clone \
-- \
"${GITHUB_SERVER_URL}/${REPOSITORY_FULL}" \
"${REPOSITORY_TEMP}"
mv "${REPOSITORY_TEMP}/${REPOSITORY_NAME}" \
/usr/local/lib/python3.*/dist-packages/
rm --force --recursive \
"${REPOSITORY_TEMP}"