]> gitweb.fluxo.info Git - rhatto/apps.git/commitdiff
Updates kvmx: 0171ddb Make kvmx-supervise work for regular users
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 28 Jan 2018 12:52:18 +0000 (10:52 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 28 Jan 2018 12:52:18 +0000 (10:52 -0200)
README.md
inception [changed from file to symlink]
infection [new file with mode: 0755]
kvmx

index 4c48b65f0f79e9f72fbe095bb1f42752baaa1281..7ff78b5bed233b96a695f73646a514ed6f673c44 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-RSD - Rhatto Software Distribution
-==================================
+LSD - Lightweight Software Distribution
+=======================================
 
 _A repository with locally-installed applications_
 
deleted file mode 100755 (executable)
index 82e0d43090245dd62bfcf8b328cd2c04d35d185a..0000000000000000000000000000000000000000
--- a/inception
+++ /dev/null
@@ -1,198 +0,0 @@
-#!/bin/bash
-#
-# The inception.
-#
-
-# Parameters
-BASENAME="`basename $0`"
-DIRNAME="$(cd `dirname $0` &> /dev/null && pwd)"
-EXCLUDES="--exclude=local --exclude=stowpkg/tree"
-DATE="`date +%Y%m%d%I%M%S`"
-BACKUPS="$HOME/.backups/$DATE"
-
-# Make sure we're running git directly and not any existing wrapper
-GIT="/usr/bin/git"
-
-# Usage
-function inception_usage {
-  echo "usage: $BASENAME <action> [options]"
-  exit 1
-}
-
-# Initialize
-function inception_init {
-  (
-    cd $DIRNAME &> /dev/null
-
-    echo "Initializing submodules..."
-    $GIT submodule sync          --recursive
-    $GIT submodule update --init --recursive
-
-    # Convert to new dotfiles layout
-    #
-    # This way we can easily check the integrity of our dotfiles
-    # once the integrity of the apps repo is checked
-    if [ -e "$HOME/.dotfiles" ]; then
-       if [ ! -h "$HOME/.dotfiles" ] || [ "`readlink $HOME/.dotfiles`" != "apps/dotfiles" ]; then
-         mkdir -p $BACKUPS
-         mv $HOME/.dotfiles $BACKUPS/
-         ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles )
-      fi
-    else
-      ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles )
-    fi
-
-    #if [ ! -e "$HOME/.dotfiles" ]; then
-    #  echo "Cloning default dotfiles..."
-    #  ./metadot/metadot clone default
-    #else
-    #  echo "Updating dotfiles..."
-    #  ./metadot/metadot fetch
-    #fi
-
-    #echo "Checking latest tag..."
-    #cd $HOME/.dotfiles
-    #$DIRNAME/utils-git/git-check-tag
-
-    #echo "Checking out the latest tag..."
-    #$DIRNAME/utils-git/git-checkout-tag
-
-    #echo "Checking dotfiles..."
-    #$DIRNAME/metadot/metadot version
-  )
-
-  #echo ""
-  #echo "Please manually verify dotfiles version and tag from the above output."
-  #echo "If everything is fine, proceed running this command again with the 'load' parameter."
-
-  #cd -
-}
-
-# Load
-function inception_load {
-  (
-    cd $DIRNAME &> /dev/null
-
-    BUNDLE="$3"
-    DEPENDENCIES="$4"
-
-    if [ "$BUNDLE" == "--all" ]; then
-      echo "Loading all dotfiles..."
-      ./metadot/metadot load --all
-
-      if [ "$DEPENDENCIES" == "--deps" ]; then
-        ./metadot/metadot deps --all
-      fi
-    elif [ ! -z "$BUNDLE" ]; then
-      echo "Loading $BUNDLE dotfiles..."
-      ./metadot/metadot load-bundle $BUNDLE
-
-      if [ "$DEPENDENCIES" == "--deps" ]; then
-        ./metadot/metadot deps-bundle $BUNDLE
-      fi
-    fi
-  )
-
-  echo "Done. Logout and login again to apply all changes."
-}
-
-# Install
-function inception_install {
-  #$0 init
-  $0 load $*
-}
-
-# Deploy
-function inception_deploy {
-  if [ ! -z "$2" ]; then
-    REMOTES="$*"
-
-    for REMOTE in $REMOTES; do
-      REMOTE="$2"
-      MODULES="`$DIRNAME/metadot/metadot installed | xargs`"
-
-      # Sync apps
-      if [ -e "$HOME/apps" ]; then
-        rsync -avz --delete $EXCLUDES $HOME/apps/ $REMOTE:apps/
-      fi
-
-      # Sync dotfiles
-      if [ -e "$HOME/.dotfiles" ]; then
-        rsync -avz --delete $HOME/.dotfiles/ $REMOTE:.dotfiles/
-      fi
-
-      # Sync loaded modules
-      ssh -T $REMOTE <<EOF
-      ##### BEGIN REMOTE SCRIPT #####
-      \$HOME/apps/inception load
-      for module in $MODULES; do
-        \$HOME/apps/metadot/metadot load \$module
-      done
-      ##### END REMOTE SCRIPT #######
-EOF
-    done
-  fi
-}
-
-# Version information
-function inception_version {
-  echo "master branch:"
-  echo "=============="
-  echo ""
-  ( cd $DIRNAME && $GIT log --show-signature -n 1 )
-
-  echo ""
-  echo "origin/master branch:"
-  echo "====================="
-  echo ""
-  ( cd $DIRNAME && $GIT log --show-signature -n 1 --remotes --branches=origin/master )
-}
-
-# Fetch
-function inception_fetch {
-  ( cd $DIRNAME && $GIT fetch --all && $GIT log --show-signature -n 1 --remotes --branches=origin/master )
-}
-
-# Merge
-function inception_merge {
-  (
-  cd $DIRNAME && $GIT merge origin/master                 && \
-                 $GIT submodule sync          --recursive && \
-                 $GIT submodule update --init --recursive
-  )
-}
-
-# Repository status
-function inception_status {
-  ( cd $DIRNAME && git status --ignored && git submodule foreach --recursive git status --ignored )
-}
-
-# Check
-if [ -z "$1" ]; then
-  inception_usage
-  exit 1
-fi
-
-# Initialize
-inception_init
-
-# Main
-if [ "$1" == "load" ]; then
-  inception_load $*
-#elif [ "$1" == "init" ]; then
-#  inception_init
-elif [ "$1" == "install" ]; then
-  inception_install $*
-elif [ "$1" == "deploy" ]; then
-  inception_deploy $*
-elif [ "$1" == "version" ]; then
-  inception_version
-elif [ "$1" == "fetch" ]; then
-  inception_fetch
-elif [ "$1" == "merge" ]; then
-  inception_merge
-elif [ "$1" == "status" ]; then
-  inception_status
-else
-  inception_usage
-fi
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..cf61f301f3f3f52a76139ad79990b79c8da8cacd
--- /dev/null
+++ b/inception
@@ -0,0 +1 @@
+infection
\ No newline at end of file
diff --git a/infection b/infection
new file mode 100755 (executable)
index 0000000..82e0d43
--- /dev/null
+++ b/infection
@@ -0,0 +1,198 @@
+#!/bin/bash
+#
+# The inception.
+#
+
+# Parameters
+BASENAME="`basename $0`"
+DIRNAME="$(cd `dirname $0` &> /dev/null && pwd)"
+EXCLUDES="--exclude=local --exclude=stowpkg/tree"
+DATE="`date +%Y%m%d%I%M%S`"
+BACKUPS="$HOME/.backups/$DATE"
+
+# Make sure we're running git directly and not any existing wrapper
+GIT="/usr/bin/git"
+
+# Usage
+function inception_usage {
+  echo "usage: $BASENAME <action> [options]"
+  exit 1
+}
+
+# Initialize
+function inception_init {
+  (
+    cd $DIRNAME &> /dev/null
+
+    echo "Initializing submodules..."
+    $GIT submodule sync          --recursive
+    $GIT submodule update --init --recursive
+
+    # Convert to new dotfiles layout
+    #
+    # This way we can easily check the integrity of our dotfiles
+    # once the integrity of the apps repo is checked
+    if [ -e "$HOME/.dotfiles" ]; then
+       if [ ! -h "$HOME/.dotfiles" ] || [ "`readlink $HOME/.dotfiles`" != "apps/dotfiles" ]; then
+         mkdir -p $BACKUPS
+         mv $HOME/.dotfiles $BACKUPS/
+         ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles )
+      fi
+    else
+      ( cd $HOME &> /dev/null && ln -s apps/dotfiles .dotfiles )
+    fi
+
+    #if [ ! -e "$HOME/.dotfiles" ]; then
+    #  echo "Cloning default dotfiles..."
+    #  ./metadot/metadot clone default
+    #else
+    #  echo "Updating dotfiles..."
+    #  ./metadot/metadot fetch
+    #fi
+
+    #echo "Checking latest tag..."
+    #cd $HOME/.dotfiles
+    #$DIRNAME/utils-git/git-check-tag
+
+    #echo "Checking out the latest tag..."
+    #$DIRNAME/utils-git/git-checkout-tag
+
+    #echo "Checking dotfiles..."
+    #$DIRNAME/metadot/metadot version
+  )
+
+  #echo ""
+  #echo "Please manually verify dotfiles version and tag from the above output."
+  #echo "If everything is fine, proceed running this command again with the 'load' parameter."
+
+  #cd -
+}
+
+# Load
+function inception_load {
+  (
+    cd $DIRNAME &> /dev/null
+
+    BUNDLE="$3"
+    DEPENDENCIES="$4"
+
+    if [ "$BUNDLE" == "--all" ]; then
+      echo "Loading all dotfiles..."
+      ./metadot/metadot load --all
+
+      if [ "$DEPENDENCIES" == "--deps" ]; then
+        ./metadot/metadot deps --all
+      fi
+    elif [ ! -z "$BUNDLE" ]; then
+      echo "Loading $BUNDLE dotfiles..."
+      ./metadot/metadot load-bundle $BUNDLE
+
+      if [ "$DEPENDENCIES" == "--deps" ]; then
+        ./metadot/metadot deps-bundle $BUNDLE
+      fi
+    fi
+  )
+
+  echo "Done. Logout and login again to apply all changes."
+}
+
+# Install
+function inception_install {
+  #$0 init
+  $0 load $*
+}
+
+# Deploy
+function inception_deploy {
+  if [ ! -z "$2" ]; then
+    REMOTES="$*"
+
+    for REMOTE in $REMOTES; do
+      REMOTE="$2"
+      MODULES="`$DIRNAME/metadot/metadot installed | xargs`"
+
+      # Sync apps
+      if [ -e "$HOME/apps" ]; then
+        rsync -avz --delete $EXCLUDES $HOME/apps/ $REMOTE:apps/
+      fi
+
+      # Sync dotfiles
+      if [ -e "$HOME/.dotfiles" ]; then
+        rsync -avz --delete $HOME/.dotfiles/ $REMOTE:.dotfiles/
+      fi
+
+      # Sync loaded modules
+      ssh -T $REMOTE <<EOF
+      ##### BEGIN REMOTE SCRIPT #####
+      \$HOME/apps/inception load
+      for module in $MODULES; do
+        \$HOME/apps/metadot/metadot load \$module
+      done
+      ##### END REMOTE SCRIPT #######
+EOF
+    done
+  fi
+}
+
+# Version information
+function inception_version {
+  echo "master branch:"
+  echo "=============="
+  echo ""
+  ( cd $DIRNAME && $GIT log --show-signature -n 1 )
+
+  echo ""
+  echo "origin/master branch:"
+  echo "====================="
+  echo ""
+  ( cd $DIRNAME && $GIT log --show-signature -n 1 --remotes --branches=origin/master )
+}
+
+# Fetch
+function inception_fetch {
+  ( cd $DIRNAME && $GIT fetch --all && $GIT log --show-signature -n 1 --remotes --branches=origin/master )
+}
+
+# Merge
+function inception_merge {
+  (
+  cd $DIRNAME && $GIT merge origin/master                 && \
+                 $GIT submodule sync          --recursive && \
+                 $GIT submodule update --init --recursive
+  )
+}
+
+# Repository status
+function inception_status {
+  ( cd $DIRNAME && git status --ignored && git submodule foreach --recursive git status --ignored )
+}
+
+# Check
+if [ -z "$1" ]; then
+  inception_usage
+  exit 1
+fi
+
+# Initialize
+inception_init
+
+# Main
+if [ "$1" == "load" ]; then
+  inception_load $*
+#elif [ "$1" == "init" ]; then
+#  inception_init
+elif [ "$1" == "install" ]; then
+  inception_install $*
+elif [ "$1" == "deploy" ]; then
+  inception_deploy $*
+elif [ "$1" == "version" ]; then
+  inception_version
+elif [ "$1" == "fetch" ]; then
+  inception_fetch
+elif [ "$1" == "merge" ]; then
+  inception_merge
+elif [ "$1" == "status" ]; then
+  inception_status
+else
+  inception_usage
+fi
diff --git a/kvmx b/kvmx
index 9903bf0df5dcda03ed1505bef247e84cc4a17ec4..0171ddb9708968a25bc4d9dee0427ad24dcc78ff 160000 (submodule)
--- a/kvmx
+++ b/kvmx
@@ -1 +1 @@
-Subproject commit 9903bf0df5dcda03ed1505bef247e84cc4a17ec4
+Subproject commit 0171ddb9708968a25bc4d9dee0427ad24dcc78ff