We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e754a88 commit f1fa121Copy full SHA for f1fa121
src/copilot-cli/install.sh
@@ -16,6 +16,22 @@ if [ "$(id -u)" -ne 0 ]; then
16
exit 1
17
fi
18
19
+apt_get_update()
20
+{
21
+ if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
22
+ echo "Running apt-get update..."
23
+ apt-get update -y
24
+ fi
25
+}
26
+
27
+# Checks if packages are installed and installs them if not
28
+check_packages() {
29
+ if ! dpkg -s "$@" > /dev/null 2>&1; then
30
+ apt_get_update
31
+ apt-get -y install --no-install-recommends "$@"
32
33
34
35
# Figure out correct version of a three part version number is not passed
36
find_version_from_git_tags() {
37
local variable_name=$1
0 commit comments