rebuild linac
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
dd0a8429b5
commit
556fe05d0d
42
linac
42
linac
|
@ -2,7 +2,7 @@
|
|||
# shellcheck disable=SC1090
|
||||
projectName='LINAC'
|
||||
projectDescription='LINAC is not a compiler'
|
||||
projectVersion=0.7.1
|
||||
projectVersion=0.7.3
|
||||
projectAuthor='Joe <joe@thisisjoes.site>'
|
||||
projectLicense='GPLv3'
|
||||
Configure() {
|
||||
|
@ -47,6 +47,25 @@ InitCheck() {
|
|||
echo 'Project info not found. Have you initialized a project?' && exit 0;
|
||||
fi
|
||||
}
|
||||
Clean() {
|
||||
local clean_string
|
||||
local dirty_string="$1"
|
||||
local dirty_chars=('!' '@' '#' '$' '%' '^' '&' '\*' '\?' '~' "\'" '\"' "\\" '\/' '(' ')' '[' ']' '{' '}' '<' '>')
|
||||
|
||||
for i in "${dirty_chars[@]}"; do
|
||||
dirty_string="${dirty_string//$i/''}"
|
||||
done
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
dirty_string="${dirty_string//$'\n'/' '}"
|
||||
dirty_string="${dirty_string//[[:space:]]/'_'}"
|
||||
dirty_string="${dirty_string//+(_)/'_'}"
|
||||
dirty_string="${dirty_string/#_/''}"
|
||||
clean_string="${dirty_string/%_/''}"
|
||||
|
||||
echo "$clean_string"
|
||||
}
|
||||
DebugPrint() {
|
||||
if "${config[debug_enabled]}"; then
|
||||
echo "${FUNCNAME[1]} says: $*"
|
||||
|
@ -114,15 +133,20 @@ InitProject() {
|
|||
}
|
||||
|
||||
WriteInitInfo() {
|
||||
echo -e "projectName=$init_name" > "$init_name.info"
|
||||
{
|
||||
echo -e "projectDescription=$init_description"
|
||||
echo -e "projectVersion=0.1.0"
|
||||
echo -e "projectAuthor=$init_author"
|
||||
echo -e "projectLicense=$init_license"
|
||||
} >> "$init_name.info"
|
||||
local project_name
|
||||
project_name="$(Clean "$init_name")"
|
||||
local escaped_description
|
||||
escaped_description="${init_description//\'/\'\\\'\'}"
|
||||
|
||||
echo -e "# Add build files to this file. One per line." > "$init_name.build"
|
||||
echo -e "projectName=$project_name" > "$project_name.info"
|
||||
{
|
||||
echo -e "projectDescription='$escaped_description'"
|
||||
echo -e "projectVersion=0.1.0"
|
||||
echo -e "projectAuthor='$init_author'"
|
||||
echo -e "projectLicense=$init_license"
|
||||
} >> "$project_name.info"
|
||||
|
||||
echo -e "# Add build files to this file. One per line." > "$project_name.build"
|
||||
}
|
||||
|
||||
local count
|
||||
|
|
Loading…
Reference in New Issue