mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-01-24 02:51:22 +01:00
Update 3 files
- /README.md - /Install.sh - /RemoteInstall.sh
This commit is contained in:
parent
f7f581ddb6
commit
ac6caf5fb9
@ -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
13
README.md
Normal 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
19
RemoteInstall.sh
Normal 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"
|
Loading…
Reference in New Issue
Block a user