Compare commits
No commits in common. "c095fe57a216dee3601bb560e97cffa668c18820" and "2eb03cf86304c65c205a64e37256c4457dd34bfb" have entirely different histories.
c095fe57a2
...
2eb03cf863
3 changed files with 40 additions and 35 deletions
36
cd.sh
36
cd.sh
|
@ -573,17 +573,30 @@ ${CD_PYTHON_PACKAGES}
|
||||||
cd_write_python_module () {
|
cd_write_python_module () {
|
||||||
cd_step "Write Python module"
|
cd_step "Write Python module"
|
||||||
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
|
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)
|
$(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)
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -714,7 +727,7 @@ cd_step () {
|
||||||
CD_STEP=$((CD_STEP+1))
|
CD_STEP=$((CD_STEP+1))
|
||||||
echo -n "\
|
echo -n "\
|
||||||
${CD_DOWN}
|
${CD_DOWN}
|
||||||
${CD_VERTICAL} ${CD_STEP} ${@}
|
${CD_BOX_VERTICAL} ${CD_STEP} ${@}
|
||||||
${CD_UP}
|
${CD_UP}
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
@ -759,7 +772,6 @@ CD_OPEN="${CD_BOX_DOWN}${CD_BOX_LEFT}"
|
||||||
CD_SHUT="${CD_BOX_UP}${CD_BOX_LEFT}"
|
CD_SHUT="${CD_BOX_UP}${CD_BOX_LEFT}"
|
||||||
|
|
||||||
CD_HORIZONTAL="${CD_BOX_HORIZONTAL}╌╌┄┄┈┈"
|
CD_HORIZONTAL="${CD_BOX_HORIZONTAL}╌╌┄┄┈┈"
|
||||||
CD_VERTICAL="${CD_BOX_VERTICAL}"
|
|
||||||
|
|
||||||
CD_DOWN="${CD_BOX_DOWN}${CD_HORIZONTAL}"
|
CD_DOWN="${CD_BOX_DOWN}${CD_HORIZONTAL}"
|
||||||
CD_SPLIT="${CD_BOX_RIGHT}${CD_HORIZONTAL}"
|
CD_SPLIT="${CD_BOX_RIGHT}${CD_HORIZONTAL}"
|
||||||
|
|
|
@ -90,8 +90,7 @@ def install_commands(path):
|
||||||
|
|
||||||
def set_ssh(*arguments):
|
def set_ssh(*arguments):
|
||||||
ssh_key, ssh_hosts = arguments
|
ssh_key, ssh_hosts = arguments
|
||||||
#
|
ssh_type = projects.environment.get('CD_SSH_TYPE', 'ed25519')
|
||||||
ssh_type = 'ed25519'
|
|
||||||
#
|
#
|
||||||
home = os.path.expanduser('~')
|
home = os.path.expanduser('~')
|
||||||
#
|
#
|
||||||
|
@ -108,24 +107,3 @@ def set_ssh(*arguments):
|
||||||
if ssh_hosts:
|
if ssh_hosts:
|
||||||
fs.write(known, ssh_hosts)
|
fs.write(known, ssh_hosts)
|
||||||
os.chmod(known, 0o400)
|
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)
|
|
||||||
|
|
15
cmd/cd-clone-python.sh
Executable file
15
cmd/cd-clone-python.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
[ "${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}"
|
Loading…
Add table
Reference in a new issue