]> git.r.bdr.sh - rbdr/dotfiles/blobdiff - provision
Add arch support, update X settings
[rbdr/dotfiles] / provision
index 60a52014ffcf0f223318dfee7ae15110604b8e5c..baac03bbad9c7718dc85e2ab17ac17b5fd3d9f78 100755 (executable)
--- a/provision
+++ b/provision
@@ -5,18 +5,25 @@ if [[ -z "$1" ]]; then
 else
   if command -v brew &>  /dev/null; then
     command_name="brew"
+    install_command="install"
   else
     if command -v apt &>  /dev/null; then
       command_name="apt"
+      install_command="install"
     else
-      echo "Error: No valid package manager. Make sure brew or apt are available."
-      exit 1
+      if command -v pacman &>  /dev/null; then
+        command_name="pacman"
+        install_command="-Sy"
+      else
+        echo "Error: No valid package manager. Make sure brew or apt are available."
+        exit 1
+      fi
     fi
   fi
   file="./provisioning/${command_name}_$1"
   if [[ -f $file ]]; then
     echo "Provisioning $1 with $command_name"
-    cat ./provisioning/${command_name}_$1 | xargs ${command_name} install
+    cat ./provisioning/${command_name}_$1 | xargs ${command_name} ${install_command}
   else
     echo "No provisioning recipe for $1 with $command_name"
     exit 1