Merge branch 'config-as-param' into develop
This commit is contained in:
commit
df734f1f34
35
src/func/clear_config
Executable file
35
src/func/clear_config
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
#remaster lib
|
||||
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
|
||||
|
||||
#check_config
|
||||
function clear_config() {
|
||||
|
||||
## Source & Aim options
|
||||
iso_source=
|
||||
squashfs_path=
|
||||
iso_aim=
|
||||
iso_lable=
|
||||
|
||||
## network
|
||||
proxy_host=
|
||||
proxy_port=
|
||||
domain=
|
||||
nameserver=
|
||||
|
||||
## Project / Distro
|
||||
project=
|
||||
|
||||
## LOG Settings
|
||||
log_file=
|
||||
log_mail_source=
|
||||
log_mail_smtp=
|
||||
log_mail_aim=
|
||||
log_mail_subject=
|
||||
|
||||
}
|
||||
|
||||
#this func is standalone executable
|
||||
[ -n "$1" ] && {
|
||||
clear_config $@
|
||||
}
|
@ -54,6 +54,16 @@ fi
|
||||
echo Remaster 2.0.4
|
||||
exit 0
|
||||
;;
|
||||
config|c)
|
||||
if [ -f "$2" ]; then
|
||||
source <LIBDIR>/func/clear_config
|
||||
source "$2"
|
||||
else
|
||||
echo "ERROR Config \"$2\" not found"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
;;
|
||||
*)
|
||||
echo 'Remaster update Live Systems'
|
||||
echo ' more information at: https://github.com/6543/remaster/'
|
||||
|
Loading…
Reference in New Issue
Block a user