Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Cesium-grp
Cesium
Commits
0bb032ef
Commit
0bb032ef
authored
1 year ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
enh(install): Fix install script
parent
ae0a2f3d
No related branches found
No related tags found
No related merge requests found
Pipeline
#35086
failed
1 year ago
Stage: alt_build
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
install.sh
+22
-30
22 additions, 30 deletions
install.sh
www/js/config-test.js
+2
-2
2 additions, 2 deletions
www/js/config-test.js
with
24 additions
and
32 deletions
install.sh
+
22
−
30
View file @
0bb032ef
...
@@ -6,13 +6,7 @@ is_installed() {
...
@@ -6,13 +6,7 @@ is_installed() {
type
"
$1
"
>
/dev/null 2>&1
type
"
$1
"
>
/dev/null 2>&1
}
}
if
[
"_
$1
"
!=
"_"
]
;
then
CESIUM_DIR
=
${
1
:-
$(
pwd
)
/cesium
}
CESIUM_DIR
=
"
$1
"
fi
if
[
"_
$CESIUM_DIR
"
=
"_"
]
;
then
DIRNAME
=
`
pwd
`
CESIUM_DIR
=
"
$DIRNAME
/cesium"
fi
latest_version
()
{
latest_version
()
{
echo
"v1.7.11"
# lastest
echo
"v1.7.11"
# lastest
...
@@ -39,16 +33,15 @@ download() {
...
@@ -39,16 +33,15 @@ download() {
install_from_github
()
{
install_from_github
()
{
local
RELEASE
=
`
curl
-XGET
-i
$(
api_release_url
)
`
local
RELEASE
=
$(
curl
-XGET
-i
"
$(
api_release_url
)
"
)
local
CESIUM_URL
=
`
echo
"
$RELEASE
"
|
grep
-P
"
\"
browser_download_url
\"
:
\"
[^
\"
]+"
|
grep
-oP
"https://[a-zA-Z0-9/.-]+-web.zip"
`
local
CESIUM_URL
=
$(
echo
"
$RELEASE
"
|
grep
-P
'"browser_download_url": "[^"]+'
|
grep
-oP
"https://[a-zA-Z0-9/.-]+-web.zip"
|
head
-n
1
)
local
CESIUM_ARCHIVE
=
$CESIUM_DIR
/cesium.zip
local
CESIUM_ARCHIVE
=
"
$CESIUM_DIR
/cesium.zip"
if
[
-d
"
$CESIUM_DIR
"
]
;
then
if
[
-f
"
$CESIUM_ARCHIVE
"
]
;
then
if
[
!
-d
"
$CESIUM_DIR
"
]
;
then
echo
"WARNING: Deleting existing archive [
$CESIUM_ARCHIVE
]"
rm
$CESIUM_ARCHIVE
fi
else
mkdir
-p
"
$CESIUM_DIR
"
mkdir
-p
"
$CESIUM_DIR
"
elif
[
-f
"
$CESIUM_ARCHIVE
"
]
;
then
echo
"WARNING: Deleting existing archive [
$CESIUM_ARCHIVE
]"
rm
"
$CESIUM_ARCHIVE
"
fi
fi
echo
"Downloading [
$CESIUM_URL
]"
echo
"Downloading [
$CESIUM_URL
]"
...
@@ -56,23 +49,23 @@ install_from_github() {
...
@@ -56,23 +49,23 @@ install_from_github() {
echo
>
&2
"Failed to download '
$CESIUM_URL
'"
echo
>
&2
"Failed to download '
$CESIUM_URL
'"
return
4
return
4
}
}
echo
"Unarchive to
$CESIUM_DIR
"
unzip
-o
$CESIUM_ARCHIVE
-d
$CESIUM_DIR
rm
$CESIUM_ARCHIVE
echo
echo
"Unarchiving to
$CESIUM_DIR
"
unzip
-o
"
$CESIUM_ARCHIVE
"
-d
"
$CESIUM_DIR
"
rm
"
$CESIUM_ARCHIVE
"
echo
"Cesium successfully installed at
$CESIUM_DIR
"
echo
"Cesium successfully installed at
$CESIUM_DIR
"
}
}
do_install
()
{
do_install
()
{
if
[
!
is_installed
"curl"
]
|
[
!
is_installed
"wget"
]
;
then
if
!
is_installed
"curl"
&&
!
is_installed
"wget"
;
then
echo
"=>
curl is not available. You will likely need to install 'curl' or 'wget' package
."
echo
"=>
Neither 'curl' nor 'wget' is available. Please install one of them
."
exit
1
exit
1
fi
fi
if
!
is_installed
"unzip"
;
then
if
!
is_installed
"unzip"
;
then
echo
"=> unzip is not available. You will likely need to install 'unzip' package."
echo
"=>
'
unzip
'
is not available. You will likely need to install
the
'unzip' package."
exit
1
exit
1
fi
fi
...
@@ -84,10 +77,9 @@ do_install() {
...
@@ -84,10 +77,9 @@ do_install() {
# during the execution of the install script
# during the execution of the install script
#
#
reset
()
{
reset
()
{
unset
-f
reset is_installed latest_version
\
unset
-f
reset is_installed latest_version api_release_url download install_from_github do_install
download install_from_github do_install
}
}
[
"_
$CESIUM_ENV
"
=
"_testing"
]
||
do_install
$1
[
"_
$CESIUM_ENV
"
=
"_testing"
]
||
do_install
"
$1
"
}
# this ensures the entire script is downloaded #
}
# this ensures the entire script is downloaded #
This diff is collapsed.
Click to expand it.
www/js/config-test.js
+
2
−
2
View file @
0bb032ef
...
@@ -80,8 +80,8 @@ angular.module("cesium.config", [])
...
@@ -80,8 +80,8 @@ angular.module("cesium.config", [])
"
defaultCountry
"
:
"
France
"
"
defaultCountry
"
:
"
France
"
}
}
},
},
"
version
"
:
"
1.7.
9
"
,
"
version
"
:
"
1.7.
11
"
,
"
build
"
:
"
202
3
-0
8-18T17:40:40.222
Z
"
,
"
build
"
:
"
202
4
-0
1-02T10:24:48.766
Z
"
,
"
newIssueUrl
"
:
"
https://git.duniter.org/clients/cesium-grp/cesium/issues/new
"
"
newIssueUrl
"
:
"
https://git.duniter.org/clients/cesium-grp/cesium/issues/new
"
})
})
...
...
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