Compare commits
No commits in common. "c1aad03c68d9527bc3ca3622ec3b695132c237fc" and "a21a21be9a2155cdf565febb5df2a82f5211c62e" have entirely different histories.
c1aad03c68
...
a21a21be9a
9 changed files with 5 additions and 22 deletions
|
@ -1,7 +1,3 @@
|
||||||
FILE="$(realpath "${BASH_SOURCE[0]}")"
|
|
||||||
NAME="$(basename "${GITHUB_REPOSITORY}")"
|
|
||||||
ROOT="$(dirname "${FILE}")"
|
|
||||||
|
|
||||||
KEY_ALGORITHM='ed25519'
|
KEY_ALGORITHM='ed25519'
|
||||||
KEY_DIRECTORY='.ssh'
|
KEY_DIRECTORY='.ssh'
|
||||||
KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}"
|
KEY_PATH="${KEY_DIRECTORY}/id_${KEY_ALGORITHM}"
|
||||||
|
@ -12,15 +8,6 @@ PACKAGES=(
|
||||||
'tree'
|
'tree'
|
||||||
)
|
)
|
||||||
SERVER="$(basename ${GITHUB_SERVER_URL})"
|
SERVER="$(basename ${GITHUB_SERVER_URL})"
|
||||||
TARGET='/usr/local/sbin'
|
|
||||||
|
|
||||||
# commands
|
|
||||||
cd "${ROOT}/${NAME}" \
|
|
||||||
|| exit
|
|
||||||
for file in *.sh ; do
|
|
||||||
cp "${file}" "${TARGET}" \
|
|
||||||
|| exit
|
|
||||||
done
|
|
||||||
|
|
||||||
# ssh
|
# ssh
|
||||||
cd \
|
cd \
|
||||||
|
@ -37,8 +24,4 @@ echo "${SERVER} ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
|
||||||
|| exit
|
|| exit
|
||||||
|
|
||||||
# packages
|
# packages
|
||||||
apt-get install --yes "${PACKAGES[@]}" \
|
apt-get install --yes "${PACKAGES[@]}"
|
||||||
|| exit
|
|
||||||
|
|
||||||
# remove
|
|
||||||
rm --force --recursive "${ROOT}"
|
|
8
cd.sh
8
cd.sh
|
@ -5,6 +5,7 @@ PACKAGES=(
|
||||||
'git'
|
'git'
|
||||||
)
|
)
|
||||||
REPOSITORY='rwx.work/cd'
|
REPOSITORY='rwx.work/cd'
|
||||||
|
TARGET='/usr/local/sbin'
|
||||||
|
|
||||||
for nameserver in "${NAMESERVERS[@]}" ; do
|
for nameserver in "${NAMESERVERS[@]}" ; do
|
||||||
echo "nameserver ${nameserver}" \
|
echo "nameserver ${nameserver}" \
|
||||||
|
@ -18,10 +19,9 @@ apt-get update \
|
||||||
apt-get install --yes "${PACKAGES[@]}" \
|
apt-get install --yes "${PACKAGES[@]}" \
|
||||||
|| exit
|
|| exit
|
||||||
|
|
||||||
DIRECTORY="$(mktemp --directory)" \
|
|
||||||
|| exit
|
|
||||||
git clone \
|
git clone \
|
||||||
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
|
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
|
||||||
"${DIRECTORY}" \
|
"${TARGET}" \
|
||||||
|| exit
|
|| exit
|
||||||
"${DIRECTORY}/bootstrap.sh"
|
|
||||||
|
cd-bootstrap.sh
|
||||||
|
|
Loading…
Add table
Reference in a new issue