]> git.armaanb.net Git - zpe.git/commitdiff
first push
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Wed, 11 Nov 2020 20:25:09 +0000 (15:25 -0500)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Wed, 11 Nov 2020 20:25:09 +0000 (15:25 -0500)
COPYING [new file with mode: 0644]
README.md [new file with mode: 0644]
branding/logo.png [new file with mode: 0644]
branding/logo.xcf [new file with mode: 0644]
zpe.zsh [new file with mode: 0755]

diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..c5b7c60
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,23 @@
+zpe - a simple zsh plugin manager
+
+Copyright 2020 Armaan Bhojwani
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+http://www.opensource.org/licenses/mit-license.php
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..da0195a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,12 @@
+# zpe
+A darn stupid zsh plugin manager
+
+## Usage
+Just put a list of git repos (full url, either ssh or http) in `~/.config/zpe/repositories`, and then 
+
+## Motivation
+All of the other available plugin managers try to get way to fancy. I just need something to automatically clone git repositories and source the files for me. Thats it!
+
+## License
+Copyright Armaan Bhojwani  
+MIT License, see COPYING for more information
diff --git a/branding/logo.png b/branding/logo.png
new file mode 100644 (file)
index 0000000..f4a74f9
Binary files /dev/null and b/branding/logo.png differ
diff --git a/branding/logo.xcf b/branding/logo.xcf
new file mode 100644 (file)
index 0000000..41fb161
Binary files /dev/null and b/branding/logo.xcf differ
diff --git a/zpe.zsh b/zpe.zsh
new file mode 100755 (executable)
index 0000000..7fad5ba
--- /dev/null
+++ b/zpe.zsh
@@ -0,0 +1,33 @@
+#!/usr/bin/env zsh
+# The ZPE plugin manager. Copyright 2020 Armaan Bhojwani, MIT License
+
+zpe-pre() {
+  config_dir=$HOME/.config/zpe/
+  plugin_dir=$HOME/.config/zpe/plugins/
+
+  [[ -d "$config_dir" ]] || mkdir -p "$config_dir"
+  touch "$config_dir"repositories
+  [[ -d "$plugin_dir" ]] || mkdir -p "$plugin_dir"
+  [[ -x git ]] && echo "please install git"
+  [[ -x find ]] && echo "please install find"
+}
+
+zpe-clone() {
+  while read line; do
+    git -C $plugin_dir clone $line
+  done < "${config_dir}repositories"
+}
+
+zpe-pull() {
+  find_dirs=$(find "$plugin_dir" -name ".git" -type d)
+  echo $find_dirs | xargs -P10 -I{} git --git-dir={} config pull.ff only
+  echo $find_dirs |  xargs  -P10 -I{} git --git-dir={} pull
+}
+
+main() {
+  zpe-pre
+  zpe-clone
+  zpe-pull
+}
+
+main