Update 3 files

- /README.md
- /Install.sh
- /RemoteInstall.sh
This commit is contained in:
octt 2023-05-17 14:31:25 +00:00
parent f7f581ddb6
commit ac6caf5fb9
3 changed files with 36 additions and 2 deletions

View File

@ -4,8 +4,10 @@ cd "$( dirname "$( realpath "$0" )" )"
CopyCfg() { CopyCfg() {
for Type in "" "." for Type in "" "."
do do
[ "$(whoami)" = "root" ] && [ -d "$1/Root" ] && cp -r $(find "$1/Root" -maxdepth 1 -mindepth 1 -name "$Type*") / [ "$(whoami)" = "root" ] && [ -d "$1/Root" ] && \
[ -d "$1/Home" ] && cp -r $(find "$1/Home" -maxdepth 1 -mindepth 1 -name "$Type*") ~/ cp -r $(find "$1/Root" -maxdepth 1 -mindepth 1 -name "$Type*") /
[ -d "$1/Home" ] && \
cp -r $(find "$1/Home" -maxdepth 1 -mindepth 1 -name "$Type*") ~/
done done
} }

13
README.md Normal file
View File

@ -0,0 +1,13 @@
This is the repo with all my system configurations. It's public just for my comfort, not for public use, but you are free anyways to use everything you want as you need. Just don't blindly install everything on your system without knowing the implications.
Install oneliner (run as root to install system components) (as I just said, don't use):
<pre><!--
--> Url="https://gitlab.com/octospacc/Configs/-/raw/main/RemoteInstall.sh"; <!--
--> if [ -n "$(which curl)" ]; <!--
--> then curl "$Url" | sh; <!--
--> elif [ -n "$(which wget)" ]; <!--
--> then wget -O - "$Url" | sh; <!--
--> else echo "Missing tools. Install \`curl\` or \`wget\`."; <!--
--> fi
</pre>

19
RemoteInstall.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/sh
[ -z "$(which git)" ] \
&& echo "Missing tools. Install \`git\`." \
&& exit 1
[ "$(whoami)" = "root" ] \
&& echo "Running as root; copying system files."
[ "$(whoami)" != "root" ] \
&& echo "Running as user; only copying home files."
true \
&& git clone --depth 1 "https://gitlab.com/octospacc/Configs" \
&& cd ./Configs \
&& echo "Which install target?" \
&& echo "(Available: $(ls -d */))" \
&& read Target \
&& sh ./Install.sh "$Target"