Skip to content

Commit 707d895

Browse files
meburpatrik
authored andcommitted
Added support for Solus.
I've been using Solus as my daily driver for about 3 years now and I'd like this to be automated =) https://getsol.us/home/
1 parent 8f99b3e commit 707d895

1 file changed

Lines changed: 94 additions & 91 deletions

File tree

linux-installer/idt-installer

Lines changed: 94 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -233,107 +233,110 @@ function install_darwin_deps {
233233
fi
234234
}
235235

236-
#------------------------------------------------------------------------------
237-
function install_deps_with_apt_get {
238-
log "Checking for and updating 'apt-get' support on Linux"
239-
if [[ -z "$(which apt-get)" ]]; then
240-
error "'apt-get' is not found. That's the only Debian/Ubuntu linux installer I know, sorry."
241-
fi
242-
if [[ -z "$(which add-apt-repository)" ]]; then
243-
$SUDO apt-get install -y software-properties-common python-software-properties
244-
fi
245-
$SUDO add-apt-repository -y ppa:git-core/ppa
246-
$SUDO apt-get -y update
247-
248-
#-- CURL:
249-
log "Installing/updating external dependency: curl"
250-
if [[ -z "$(which curl)" || "$FORCE" == true ]]; then
251-
$SUDO apt-get -y install curl
252-
fi
253-
254-
#-- GIT:
255-
log "Installing/updating external dependency: git"
256-
if [[ -z "$(which git)" || "$FORCE" == true ]]; then
257-
$SUDO apt-get -y install git
258-
log "Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
259-
fi
236+
"Linux")
237+
case "$DISTRO" in
238+
"Ubuntu")
239+
log "Checking for and updating 'apt-get' support on Linux"
240+
if [[ -z "$(which apt-get)" ]]; then
241+
error "'apt-get' is not found. Thats the only linux installer I know, sorry."
242+
fi
243+
if [[ -z "$(which add-apt-repository)" ]]; then
244+
$SUDO apt-get install -y software-properties-common python-software-properties
245+
fi
246+
$SUDO add-apt-repository -y ppa:git-core/ppa
247+
$SUDO apt-get -y update
260248

261-
#-- Docker:
262-
install_docker
249+
#-- CURL:
250+
log "Installing/updating external dependency: curl"
251+
if [[ -z "$(which curl)" || "$FORCE" == true ]]; then
252+
$SUDO apt-get -y install curl
253+
fi
254+
#-- GIT:
255+
log "Installing/updating external dependency: git"
256+
if [[ -z "$(which git)" || "$FORCE" == true ]]; then
257+
$SUDO apt-get -y install git
258+
log "Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
259+
fi
263260

264-
#-- kubectl:
265-
log "Installing/updating external dependency: kubectl"
266-
if [[ -z "$(which kubectl)" || "$FORCE" == true ]]; then
267-
local kube_version=$(get_kubectl_version)
268-
curl --progress-bar -LO https://storage.googleapis.com/kubernetes-release/release/v$kube_version/bin/linux/amd64/kubectl
269-
$SUDO mv ./kubectl /usr/local/bin/kubectl
270-
$SUDO chmod +x /usr/local/bin/kubectl
271-
log "Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
272-
fi
261+
#-- Docker:
262+
log "Installing/updating external dependency: docker"
263+
if [[ -z "$(which docker)" || "$FORCE" == true ]]; then
264+
curl -fsSL get.docker.com | $SUDO sh -
265+
if [ "$SUDO" ]; then
266+
# Allow docker to run as a non-root user (if not running as root).
267+
sudo groupadd docker 2>/dev/null
268+
sudo usermod -aG docker $USER 2>/dev/null
269+
else
270+
log 'If you want to run docker without sudo run: "sudo groupadd docker && sudo usermod -aG docker $USER"'
271+
fi
272+
log "Please review any setup requirements for 'docker' from: https://docs.docker.com/engine/installation/"
273+
fi
273274

274-
#-- helm:
275-
log "Installing/updating external dependency: helm"
276-
if [[ -z "$(which helm)" || "$FORCE" == true ]]; then
277-
curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
278-
log "Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
279-
fi
280-
}
275+
#-- kubectl:
276+
log "Installing/updating external dependency: kubectl"
277+
if [[ -z "$(which kubectl)" || "$FORCE" == true ]]; then
278+
curl --progress-bar -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
279+
$SUDO mv ./kubectl /usr/local/bin/kubectl
280+
$SUDO chmod +x /usr/local/bin/kubectl
281+
log "Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
282+
fi
281283

282-
#------------------------------------------------------------------------------
283-
function install_deps_with_eopkg {
284-
logrevert "Checking for and updating 'eopkg' support on Linux"
285-
if [[ -z "$(which eopkg)" ]]; then
286-
error "'eopkg' is not found. Thats the only linux installer I know, sorry."
287-
fi
288-
$SUDO eopkg ur Solus
284+
#-- helm:
285+
log "Installing/updating external dependency: helm"
286+
if [[ -z "$(which helm)" || "$FORCE" == true ]]; then
287+
curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
288+
log "Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
289+
fi
290+
;;
289291

290-
#-- CURL:
291-
log "Installing/updating external dependency: curl"
292-
if [[ -z "$(which curl)" || "$FORCE" == true ]]; then
293-
$SUDO eopkg it curl
294-
fi
295-
#-- GIT:
296-
log "Installing/updating external dependency: git"
297-
if [[ -z "$(which git)" || "$FORCE" == true ]]; then
298-
$SUDO eopkg it git
299-
log "Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
300-
fi
292+
"Solus")
293+
log "Checking for and updating 'eopkg' support on Linux"
294+
if [[ -z "$(which eopkg)" ]]; then
295+
error "'eopkg' is not found. Thats the only linux installer I know, sorry."
296+
fi
297+
$SUDO eopkg ur Solus
301298

302-
#-- Docker:
303-
log "Installing/updating external dependency: docker"
304-
if [[ -z "$(which docker)" || "$FORCE" == true ]]; then
305-
$SUDO eopkg it docker
306-
if [ "$SUDO" ]; then
307-
# Allow docker to run as a non-root user (if not running as root).
308-
sudo groupadd docker 2>/dev/null
309-
sudo usermod -aG docker $USER 2>/dev/null
310-
else
311-
log 'If you want to run docker without sudo run: "sudo groupadd docker && sudo usermod -aG docker $USER"'
299+
#-- CURL:
300+
log "Installing/updating external dependency: curl"
301+
if [[ -z "$(which curl)" || "$FORCE" == true ]]; then
302+
$SUDO eopkg it curl
303+
fi
304+
#-- GIT:
305+
log "Installing/updating external dependency: git"
306+
if [[ -z "$(which git)" || "$FORCE" == true ]]; then
307+
$SUDO eopkg it git
308+
log "Please review any setup requirements for 'git' from: https://git-scm.com/downloads"
312309
fi
313-
log "Please review any setup requirements for 'docker' from: https://docs.docker.com/engine/installation/"
314-
fi
315310

316-
#-- kubectl:
317-
log "Installing/updating external dependency: kubectl"
318-
if [[ -z "$(which kubectl)" || "$FORCE" == true ]]; then
319-
$SUDO eopkg it kubectl
320-
log "Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
321-
fi
311+
#-- Docker:
312+
log "Installing/updating external dependency: docker"
313+
if [[ -z "$(which docker)" || "$FORCE" == true ]]; then
314+
$SUDO eopkg it docker
315+
if [ "$SUDO" ]; then
316+
# Allow docker to run as a non-root user (if not running as root).
317+
sudo groupadd docker 2>/dev/null
318+
sudo usermod -aG docker $USER 2>/dev/null
319+
else
320+
log 'If you want to run docker without sudo run: "sudo groupadd docker && sudo usermod -aG docker $USER"'
321+
fi
322+
log "Please review any setup requirements for 'docker' from: https://docs.docker.com/engine/installation/"
323+
fi
322324

323-
#-- helm:
324-
log "Installing/updating external dependency: helm"
325-
if [[ -z "$(which helm)" || "$FORCE" == true ]]; then
326-
curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
327-
log "Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
328-
fi
329-
}
325+
#-- kubectl:
326+
log "Installing/updating external dependency: kubectl"
327+
if [[ -z "$(which kubectl)" || "$FORCE" == true ]]; then
328+
$SUDO eopkg it kubectl
329+
log "Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/"
330+
fi
330331

331-
#------------------------------------------------------------------------------
332-
function install_deps_with_yum {
333-
log "Checking for and updating 'yum' support on Linux"
334-
if [[ -z "$(which yum)" ]]; then
335-
error "'yum' is not found. That's the only RedHat/Centos linux installer I know, sorry."
336-
fi
332+
#-- helm:
333+
log "Installing/updating external dependency: helm"
334+
if [[ -z "$(which helm)" || "$FORCE" == true ]]; then
335+
curl -fsSL https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
336+
log "Please review any setup requirements for 'helm' from: https://github.com/kubernetes/helm/blob/master/docs/install.md"
337+
fi
338+
;;
339+
esac
337340

338341
#-- CURL:
339342
log "Installing/updating external dependency: curl"

0 commit comments

Comments
 (0)