]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - provision
Show shell version of asdf shims
[rbdr/dotfiles] / provision
... / ...
CommitLineData
1#!/usr/bin/env sh
2
3if [[ -z "$1" ]]; then
4 echo "Run with parameters: essential, nice, cask_essential, or cask_nice"
5else
6 if command -v brew &> /dev/null; then
7 command_name="brew"
8 else
9 if command -v apt &> /dev/null; then
10 command_name="apt"
11 else
12 echo "Error: No valid package manager. Make sure brew or apt are available."
13 exit 1
14 fi
15 fi
16 file="./provisioning/${command_name}_$1"
17 if [[ -f $file ]]; then
18 echo "Provisioning $1 with $command_name"
19 cat ./provisioning/${command_name}_$1 | xargs ${command_name} install
20 else
21 echo "No provisioning recipe for $1 with $command_name"
22 exit 1
23 fi
24fi