Compare commits

..

No commits in common. "6cde24300528b5b2f8163ff177d8bea505a51fda" and "003deb6455edfcc3d19640422f9ad474ce3e2041" have entirely different histories.

2 changed files with 24 additions and 44 deletions

View file

@ -1,28 +1,20 @@
KEY_ALGORITHM='ed25519'
KEY_PATH=".ssh/id_ed25519"
KEY_PUBLIC='AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5'
PACKAGES=(
'python3'
'rsync'
'tree'
)
SERVER="$(basename ${GITHUB_SERVER_URL})"
# ssh
mkdir '.ssh' \
|| exit
mkdir --parents ~/.ssh
echo "${CD}" > "${KEY_PATH}" \
|| exit
echo "${CD}" > ~/.ssh/id_ed25519
unset CD
chmod '400' "${KEY_PATH}" \
|| exit
chmod 400 ~/.ssh/id_ed25519
echo "${SERVER} ssh-${KEY_ALGORITHM} ${KEY_PUBLIC}" \
> '.ssh/known_hosts' \
|| exit
echo -n "\
|1|BcccCTMLpM9HHSgJmPu/FFOwOv0=|+3BKK02xibpCPxQ9Nghi2GbXLng= \
ssh-ed25519 \
AAAAC3NzaC1lZDI1NTE5AAAAIPHCNcgHlQoiNTXfnUZYvHz9OZwYsmBCrSSV7a7Zche5
" > ~/.ssh/known_hosts
# packages
apt-get install --yes "${PACKAGES[@]}"
apt-get install --yes \
'python3' \
'rsync' \
'tree' \

36
cd.sh
View file

@ -1,27 +1,15 @@
NAMESERVERS=(
'9.9.9.9'
)
PACKAGES=(
'git'
)
REPOSITORY='rwx.work/cd'
TARGET='/usr/local/sbin'
for nameserver in "${NAMESERVERS[@]}" ; do
echo "nameserver ${nameserver}" \
>> '/etc/resolv.conf' \
|| exit
done
echo "\
nameserver 9.9.9.9
" > '/etc/resolv.conf' \
&& \
apt-get update \
|| exit
apt-get install --yes "${PACKAGES[@]}" \
|| exit
&& \
apt-get install \
'git' \
--yes \
&& \
git clone \
"${GITHUB_SERVER_URL}/${REPOSITORY}" \
"${TARGET}" \
|| exit
"${GITHUB_SERVER_URL}/rwx.work/cd" \
'/usr/local/sbin' \
&& \
cd-bootstrap.sh