mirror of
https://gitlab.com/octospacc/Configs.git
synced 2024-12-22 04:34:27 +01:00
New install scripts, consistent folder structure
This commit is contained in:
parent
f955b587e7
commit
33c20614d9
24
Install.sh
Executable file
24
Install.sh
Executable 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
|
@ -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
9
Server/Repo.Update.sh
Executable 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
1
Tests/Home/.Configs.Test
Normal file
@ -0,0 +1 @@
|
||||
TEST
|
1
Tests/Root/.Configs.Test
Normal file
1
Tests/Root/.Configs.Test
Normal file
@ -0,0 +1 @@
|
||||
TEST
|
Loading…
Reference in New Issue
Block a user