New install scripts, consistent folder structure

This commit is contained in:
octospacc 2023-03-06 09:40:49 +01:00
parent f955b587e7
commit 33c20614d9
26 changed files with 35 additions and 8 deletions

24
Install.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
cd "$( dirname "$( realpath "$0" )" )"
CopyCfg() {
for Type in "" "."
do
#[ "$(whoami)" = "root" ] && cp -r $1/Root/$Type* /
#cp -r $1/Home/$Type* ~/
[ "$(whoami)" = "root" ] && [ -d "$1/Root" ] && cp $(find "$1/Root" -maxdepth 1 -mindepth 1 -name "$Type*") /
[ -d "$1/Home" ] && cp $(find "$1/Home" -maxdepth 1 -mindepth 1 -name "$Type*") ~/
done
}
Cur="$1"
while [ ! -z "$Cur" ]
do
if [ -d "$Cur" ]
then
echo "$Cur"
CopyCfg "$Cur"
fi
shift > /dev/null 2>&1 || Cur=""
Cur="$1"
done

View File

View File

@ -1,8 +0,0 @@
#!/bin/sh
cd "$( dirname "$( realpath "$0" )" )"
cp -v /etc/diycron ./diycron
cp -v /Server/Scripts/Backup/*.sh ./Scripts/Backup/
cp -v /Server/Scripts/Backup/*.cfg ./Scripts/Backup/
# nginx was done manually

9
Server/Repo.Update.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
cd "$( dirname "$( realpath "$0" )" )"
cd ./Root
cp -v /etc/diycron ./etc/diycron
# nginx was done manually
cp -v /Server/Scripts/Backup/*.sh ./Server/Scripts/Backup/
cp -v /Server/Scripts/Backup/*.cfg ./Server/Scripts/Backup/

1
Tests/Home/.Configs.Test Normal file
View File

@ -0,0 +1 @@
TEST

1
Tests/Root/.Configs.Test Normal file
View File

@ -0,0 +1 @@
TEST