Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Appmonitor CLI client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Appmonitor CLI client
Commits
bb5bfd9f
Commit
bb5bfd9f
authored
3 months ago
by
Axel Hahn
Browse files
Options
Downloads
Patches
Plain Diff
installer: add params and reset installation
parent
5f809446
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.php
+0
-1
0 additions, 1 deletion
build.php
inc_functions.php
+17
-2
17 additions, 2 deletions
inc_functions.php
installer.php
+30
-4
30 additions, 4 deletions
installer.php
with
47 additions
and
7 deletions
build.php
+
0
−
1
View file @
bb5bfd9f
...
...
@@ -17,7 +17,6 @@ echo "
B U I L D E R
"
;
_chdir
(
$selfdir
);
...
...
This diff is collapsed.
Click to expand it.
inc_functions.php
+
17
−
2
View file @
bb5bfd9f
...
...
@@ -78,7 +78,7 @@ function _exec($cmd): void
$sTime
=
"... ⏱️ Time: "
.
round
(
$iEnd
-
$iStart
,
3
)
.
"s
\n
"
;
if
(
$rc
!=
0
)
{
echo
"rc=
$rc
$sTime
"
;
_abort
(
"
Error:
Command failed. Aborting."
,
$rc
);
_abort
(
"Command failed. Aborting."
,
$rc
);
}
_ok
(
$sTime
);
}
...
...
@@ -88,7 +88,7 @@ function _mkdir(string $sMyDir): void
if
(
!
is_dir
(
$sMyDir
))
{
echo
"DIR > '
$sMyDir
' "
;
if
(
!
mkdir
(
$sMyDir
,
0755
,
true
))
{
_abort
(
"
ERROR: mkdir
failed."
);
_abort
(
"
mkdir('
$sMyDir
')
failed."
);
}
_ok
();
echo
"
\n
"
;
...
...
@@ -97,3 +97,18 @@ function _mkdir(string $sMyDir): void
}
}
function
_rm
(
string
$sFileObj
):
void
{
if
(
is_dir
(
$sFileObj
))
{
_exec
(
"rm -rf
\"
$sFileObj
\"
"
);
}
else
if
(
file_exists
(
$sFileObj
))
{
if
(
!
unlink
(
$sFileObj
))
{
_abort
(
"unlink('
$sFileObj
') failed."
);
}
_ok
(
"File was deleted"
);
}
else
{
_skip
(
"rm '
$sFileObj
' - does not exist"
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
installer.php
+
30
−
4
View file @
bb5bfd9f
...
...
@@ -34,17 +34,41 @@ spc-windows-x64.exe 2025-02-15 17:30:46 3.9M
// ----------------------------------------------------------------------
echo
"
I N S T A L L E R
I N S T A L L E R
* U P D A T E R
- gets appmonitor sources
- gets appmonitor sources
or updates it
- gets spc binary
- spc downloads PHP and libs
- spc builds micro (~2 min)
- spc builds micro
"
;
// ----------------------------------------------------------------------
if
(
$argc
>
1
)
{
parse_str
(
implode
(
'&'
,
array_slice
(
$argv
,
1
)),
$ARGS
);
}
if
(
isset
(
$ARGS
[
'-h'
])
||
isset
(
$ARGS
[
'--help'
])){
echo
"
HELP
-h, --help Show this help
-r, --reset Reset; delete created folders of installer or build
"
;
exit
(
0
);
}
_chdir
(
$selfdir
);
if
(
isset
(
$ARGS
[
'-r'
])
||
isset
(
$ARGS
[
'--reset'
])){
_h1
(
"Reset data"
);
_rm
(
$dirBuild
);
_rm
(
$dirExternal
);
_rm
(
$dirPackages
);
}
// ----------------------------------------------------------------------
_h1
(
"Create directories"
);
...
...
@@ -144,9 +168,11 @@ if(file_exists($doneBuild)){
if
(
$bDoBild
){
_exec
(
"
$SPC
--no-interaction doctor"
);
echo
"💡 Hint: this can take a minute on a fresh install ...
\n
"
;
_exec
(
"
$SPC
download --no-interaction --with-php=
$php_version
--for-extensions
\"
$php_libs
\"
"
);
echo
"💡 Hint: this can take
2
minutes ...
\n
"
;
echo
"💡 Hint: this can take
4
minutes
on a fresh install or less on module changes
...
\n
"
;
_exec
(
"
$SPC
build --no-interaction --build-micro
\"
$php_libs
\"
"
);
file_put_contents
(
"
$doneBuild
"
,
date
(
"Y-m-d H:i:s"
)
.
"
\n
$sDoneData
\n
"
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment