Files
lnx-arch/scripts/ctsetup.sh
committer@tuxwarrior edd84f6a64 u
2025-03-29 05:26:06 -05:00

32 lines
902 B
Bash
Executable File

#!/usr/bin/env bash
# klevstul
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# how to download this script (as root):
#
# cd /tmp
# wget https://gt.op.fo/fro/lnx-arch/raw/branch/master/scripts/ctsetup.sh
# cat ctsetup.sh # verify the downloaded script (IMPORTANT!)
# chmod 755 ctsetup.sh # make the script executable
# sudo ./ctsetup.sh # run the script
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "<< ctsetup.sh >>"
if [ "$EUID" -ne 0 ]
then echo "error: run as 'root'"
exit
fi
base_url=https://gt.op.fo/fro/lnx-arch/raw/branch/master
src_url=${base_url}/scripts/ct.sh
home_dir=/usr/local/bin
mkdir -p ${home_dir}
wget -q ${src_url} -O ${home_dir}/ct.sh
chmod 755 ${home_dir}/ct.sh
ln -s ${home_dir}/ct.sh /usr/local/bin/ct
echo "a fresh copy of ct.sh is now located at '${home_dir}/ct.sh'"