FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/.devcontainer/swift/update-codeql.sh at codeql-cli-2.11.3 · github/codeql · GitHub
github
/
codeql
Public
Notifications
You must be signed in to change notification settings
Fork
2.1k
Star
10.1k
Code
Issues
1k
Pull requests
468
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
.devcontainer
/
swift
/
update-codeql.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
20 lines (19 loc) · 746 Bytes
Breadcrumbs
codeql
/
.devcontainer
/
swift
/
update-codeql.sh
Copy path
File metadata and controls
executable file
·
20 lines (19 loc) · 746 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!
/bin/bash -e
URL=https://github.com/github/codeql-cli-binaries/releases
LATEST_VERSION=
$(
curl -L -s -H
'
Accept: application/json
'
$URL
/latest
|
sed -e
'
s/.*"tag_name":"\([^"]*\)".*/\1/
'
)
CURRENT_VERSION=v
$(
codeql version
2>
/dev/null
|
sed -ne
'
s/.*release \([0-9.]*\)\./\1/p
'
)
if
[[
$CURRENT_VERSION
!=
$LATEST_VERSION
]]
;
then
if
[[
$UID
!=
0 ]]
;
then
echo
"
update required, please run this script with sudo:
"
echo
"
sudo
$0
"
exit
1
fi
ZIP=
$(
mktemp codeql.XXXX.zip
)
curl -fSqL -o
$ZIP
$URL
/download/
$LATEST_VERSION
/codeql-linux64.zip
unzip -q
$ZIP
-d /opt
rm
$ZIP
ln -sf /opt/codeql/codeql /usr/local/bin/codeql
echo
installed version
$LATEST_VERSION
else
echo
current version
$CURRENT_VERSION
is up-to-date
fi
Back
|
FazBrowse Home
|
New Git URL