rename func

This commit is contained in:
6543 2018-06-01 23:44:39 +02:00
parent 495bbb5f4a
commit 3b3c588dcc

View File

@ -1,55 +0,0 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }

#config_check
function config_check() {

#Project
[ -f "<LIBDIR>/proj/$project" ] || {
echo "No Project \"$project\" is not supported"
return 3
}

#live-system files
if [ -f "$iso_source" ]; then
if [ -n "$iso_aim" ] && [ -d "${iso_aim%/*}" ]; then
#Lable
[ -z "$iso_lable" ] && iso_lable="$project"

echo 'iso_source -> iso_aim'
echo 'iso_source -> squashfs [optinal]'
else
if [ -n "$squashfs_path" ] && [ -d "${squashfs_path%/*}" ]; then
echo 'iso_source -> squashfs'
else
# ERROR
echo "No corect AIM in Settings"
return 3
fi
fi
else
if [ -f "$squashfs_path" ]; then
if [ -n "$iso_aim" ]; then
# ERROR
echo "only Squashfs source in Settings, cant creat ISO"
return 3
else
echo 'squashfs -> squashfs'
fi
else
# ERROR
echo "No corect Source in Settings"
return 3
fi
fi




}

#this func is standalone executable
[ -n "$1" ] && {
config_check $@
}