source cant use variables (p1)

This commit is contained in:
6543
2018-05-06 19:26:21 +02:00
parent f2b3b5f530
commit 838a1e709a
23 changed files with 172 additions and 95 deletions

40
src/proj/debian Normal file
View File

@ -0,0 +1,40 @@
#!/bin/bash
#remaster lib
[ -d "$LIBDIR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDIR"] || { echo "LIBDIR not exist"; exit 1; }
####################################
##### Base Template D E B I A N ####
####################################
# .
#tools_add [chroot_dir] [tools_list]
function tools_add() {
echo "add tools ... "
#$1 = chroot directory
chroot_dir="$1"
tools_list="$2"
chroot "$chroot_dir" /bin/bash -c "apt-get update" > /dev/null
[ "$?" == "0" ] && echo "apt-get update: success"
chroot "$chroot_dir" /bin/bash -c "apt-get install -y $tools_list" | grep -v "wird eingerichtet ..." | grep -v "Vormals nicht ausgewähltes Paket" | grep -v "Entpacken von" | grep -v "Holen: " | grep -v "Trigger für" | grep -v "update-alternatives:"
echo "done"
}
#os_update [chroot_dir]
function os_update() {
echo "updating os ... "
#$1 = chroot directory
chroot_dir="$1"
chroot "$chroot_dir" /bin/bash -c "apt-get update" > /dev/null
[ "$?" == "0" ] && echo "apt-get update: success"
chroot "$chroot_dir" /bin/bash -c "apt-get dist-upgrade -y" | grep -v "wird eingerichtet ..." | grep -v "Vormals nicht ausgewähltes Paket" | grep -v "Entpacken von" | grep -v "Holen: " | grep -v "Trigger für" | grep -v "update-alternatives:"
chroot "$chroot_dir" /bin/bash -c "apt-get clean"
echo "done"
}
TEST="ja"
TEST2="ja"

10
src/proj/desinfect.17 Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
#remaster lib
[ -d "$LIBDIR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDIR"] || { echo "LIBDIR not exist"; exit 1; }
#desinfect.17
# . -Y ubuntu.16.04 -> ubuntu -> debian
source $LIBDIR/proj/ubuntu.16.04
TEST2="na"

View File

12
src/proj/ubuntu Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
#remaster lib
[ -d "$LIBDIR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDIR"] || { echo "LIBDIR not exist"; exit 1; }
####################################
##### Base Template U B U N T U ####
####################################
# . -> debian
source $LIBDIR/proj/debian
TEST2="jaUb"

View File

@ -0,0 +1,10 @@
#!/bin/bash
#remaster lib
[ -d "$LIBDIR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDIR"] || { echo "LIBDIR not exist"; exit 1; }
#ubuntu.16.04
# . -> ubuntu -> debian
source $LIBDIR/proj/ubuntu
TEST2="jaUBU"