/ curae ➔ ct
renamed curae to ct (caretaker), plus some bashrc tidying.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# what: curae is latin an means to take care. this script takes care
|
||||
# of the system (adjusted for arch linux).
|
||||
# what: ct - for caretaker
|
||||
# author: fk
|
||||
# started: may 2024
|
||||
#
|
||||
@@ -16,12 +15,12 @@
|
||||
# WARNING: EXAMINE THE CONTENT BEFORE EXECUTION. RUN AT YOUR OWN RISK.
|
||||
#
|
||||
#############################################################################
|
||||
echo "<< curae.sh >>"
|
||||
echo "<< ct.sh >>"
|
||||
|
||||
base_url=https://gt.op.fo/fro/lnx-arch/raw/branch/master
|
||||
scripts_url=${base_url}/scripts
|
||||
home_dir=/usr/local/bin
|
||||
this_file=curae.sh
|
||||
this_file=ct.sh
|
||||
|
||||
|
||||
# https://stackoverflow.com/questions/18215973/how-to-check-if-running-as-root-in-a-bash-script
|
||||
31
scripts/ctsetup.sh
Executable file
31
scripts/ctsetup.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
# ./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'"
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/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/curae_setup.sh
|
||||
# cat curae_setup.sh # verify the downloaded script (IMPORTANT!)
|
||||
# chmod 755 curae_setup.sh # make the script executable
|
||||
# ./curae_setup.sh # run the script
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
echo "<< curae_setup.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/curae.sh
|
||||
home_dir=/usr/local/bin
|
||||
this_file_name=fk-arc3
|
||||
|
||||
mkdir -p ${home_dir}
|
||||
wget -q ${src_url} -O ${home_dir}/curae.sh
|
||||
chmod 755 ${home_dir}/curae.sh
|
||||
|
||||
ln -s ${home_dir}/curae.sh /usr/local/bin/curae
|
||||
|
||||
echo "a fresh copy of curae.sh is now located at '${home_dir}/curae.sh'"
|
||||
Reference in New Issue
Block a user