Skip to content

Commit

Permalink
treehouses services supported arches (fixes #1836) (#1852)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Neethu-Mohan and dogi authored Feb 20, 2021
1 parent 0514a22 commit a67e4de
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 63 deletions.
11 changes: 5 additions & 6 deletions modules/services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function services {
do
if [[ ! $file = *"README.md"* ]]; then
service=$(echo "${file##*/}" | sed -e 's/^install-//' -e 's/.sh$//')
if check_arm $service; then
if check_arch $service; then
echo $service
fi
fi
Expand Down Expand Up @@ -492,11 +492,10 @@ function services {
esac
}

function check_arm {
arms=($(source $SERVICES/install-${1}.sh && supported_arms))
for i in "${arms[@]}"
do
if [ "$(detect arch)" = "$i" ]; then
function check_arch {
arches=($(source $SERVICES/install-${1}.sh && supported_arches))
for i in "${arches[@]}"; do
if [ "$(detect arch)" == "$i" ]; then
return 0
fi
done
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@treehouses/cli",
"version": "1.25.3",
"version": "1.25.4",
"remote": "4000",
"description": "Thin command-line interface for Raspberry Pi low level configuration.",
"main": "cli.sh",
Expand Down
4 changes: 2 additions & 2 deletions services/install-bookstack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-cloud9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-couchdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-dokuwiki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-grocy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "x86_64"
echo "aarch64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-invoiceninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
}

Expand Down
2 changes: 1 addition & 1 deletion services/install-jellyfin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function uses_env {
}

# add supported arch(es)
function supported_arms {
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-kolibri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "x86_64"
}
Expand Down
4 changes: 2 additions & 2 deletions services/install-librespeed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "x86_64"
echo "aarch64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-mariadb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
}
Expand Down
4 changes: 2 additions & 2 deletions services/install-mastodon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
}

Expand Down
4 changes: 2 additions & 2 deletions services/install-minetest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "x86_64"
echo "aarch64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
}
Expand Down
4 changes: 2 additions & 2 deletions services/install-moodle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
}
Expand Down
4 changes: 2 additions & 2 deletions services/install-musicblocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-netdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "x86_64"
echo "aarch64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-ntopng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
}

Expand Down
4 changes: 2 additions & 2 deletions services/install-pihole.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "aarch64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-piwigo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-planet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
}
Expand Down
4 changes: 2 additions & 2 deletions services/install-portainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-privatebin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "aarch64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-pylon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-rutorrent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-seafile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function uses_env {
echo true
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-transmission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "aarch64"
echo "x86_64"
Expand Down
4 changes: 2 additions & 2 deletions services/install-turtleblocksjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function uses_env {
echo false
}

# add supported arm(s)
function supported_arms {
# add supported arch(es)
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "x86_64"
Expand Down
2 changes: 1 addition & 1 deletion services/install-webssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function uses_env {
}

# add supported arch(es)
function supported_arms {
function supported_arches {
echo "armv7l"
echo "armv6l"
echo "aarch64"
Expand Down

0 comments on commit a67e4de

Please sign in to comment.