aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-04-07 10:25:03 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-04-07 10:25:03 -0300
commit5cbd294d9fb1587926119e60a00dc3e66a3c1416 (patch)
tree0b50eff2e093ce900246a8411a1fc28e3a3a5b34 /share
parentf68b373961614900fa299e9136e693168440b1db (diff)
downloadtrashman-5cbd294d9fb1587926119e60a00dc3e66a3c1416.tar.gz
trashman-5cbd294d9fb1587926119e60a00dc3e66a3c1416.tar.bz2
Adds hoarder for local installs
Diffstat (limited to 'share')
-rw-r--r--share/hoarder/mps-youtube/info1
-rwxr-xr-xshare/hoarder/mps-youtube/unix/linux/debian/install11
-rw-r--r--share/hoarder/rainbowstream/info1
-rwxr-xr-xshare/hoarder/rainbowstream/unix/linux/debian/install10
-rw-r--r--share/trashman/trashman/debian14
-rw-r--r--share/trashman/trashman/functions7
6 files changed, 40 insertions, 4 deletions
diff --git a/share/hoarder/mps-youtube/info b/share/hoarder/mps-youtube/info
new file mode 100644
index 0000000..1a8b940
--- /dev/null
+++ b/share/hoarder/mps-youtube/info
@@ -0,0 +1 @@
+terminal based youtube player and downloader
diff --git a/share/hoarder/mps-youtube/unix/linux/debian/install b/share/hoarder/mps-youtube/unix/linux/debian/install
new file mode 100755
index 0000000..46781af
--- /dev/null
+++ b/share/hoarder/mps-youtube/unix/linux/debian/install
@@ -0,0 +1,11 @@
+#!/usr/bin/env sh
+#
+# Install mps-youtube
+# https://github.com/mps-youtube/mps-youtube
+
+# Requirements
+trashman_apt_install_packages python3-pip mpv
+pip3 install --user youtube-dl
+
+# Install
+pip3 install --user -U git+https://github.com/mps-youtube/mps-youtube.git
diff --git a/share/hoarder/rainbowstream/info b/share/hoarder/rainbowstream/info
new file mode 100644
index 0000000..02c86c9
--- /dev/null
+++ b/share/hoarder/rainbowstream/info
@@ -0,0 +1 @@
+a smart and nice twitter client on terminal written in python
diff --git a/share/hoarder/rainbowstream/unix/linux/debian/install b/share/hoarder/rainbowstream/unix/linux/debian/install
new file mode 100755
index 0000000..aa46b9a
--- /dev/null
+++ b/share/hoarder/rainbowstream/unix/linux/debian/install
@@ -0,0 +1,10 @@
+#!/usr/bin/env sh
+#
+# Install rainbowstream
+# https://github.com/orakaro/rainbowstream
+
+# Requirements
+trashman_apt_install_packages python-pip python-dev libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
+
+# Install
+pip install --user rainbowstream
diff --git a/share/trashman/trashman/debian b/share/trashman/trashman/debian
index abf2612..1bdd504 100644
--- a/share/trashman/trashman/debian
+++ b/share/trashman/trashman/debian
@@ -3,12 +3,16 @@
# Custom functions for debian-like systems.
#
+trashman_apt_update() {
+ $SUDO apt-get update
+}
+
trashman_apt_install() {
if [ -z "$1" ]; then
return
fi
- LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y $*
+ LC_ALL=C DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y $*
}
# Machine architecture
@@ -41,12 +45,14 @@ trashman_apt_install_packages() {
return
fi
+ trashman_apt_update
+
for package in $*; do
trashman_apt_check $package
if [ "$?" = "1" ]; then
trashman_echo "Installing package $package..."
- DEBIAN_FRONTEND=noninteractive apt-get install $package -y || exit 1
+ DEBIAN_FRONTEND=noninteractive $SUDO apt-get install $package -y || exit 1
fi
done
}
@@ -60,6 +66,6 @@ trashman_install_apt_key() {
exit 1
fi
- cp $orig /etc/apt/trusted.gpg.d/$dest || exit 1
- chown root.root /etc/apt/trusted.gpg.d/$dest && chmod 644 /etc/apt/trusted.gpg.d/$dest || exit 1
+ $SUDO cp $orig /etc/apt/trusted.gpg.d/$dest || exit 1
+ $SUDO chown root.root /etc/apt/trusted.gpg.d/$dest && $SUDO chmod 644 /etc/apt/trusted.gpg.d/$dest || exit 1
}
diff --git a/share/trashman/trashman/functions b/share/trashman/trashman/functions
index 7478322..a870736 100644
--- a/share/trashman/trashman/functions
+++ b/share/trashman/trashman/functions
@@ -217,3 +217,10 @@ trashman_check_root() {
exit 1
fi
}
+
+# Check for sudo
+trashman_check_sudo () {
+ if [ "`whoami`" != "root" ]; then
+ SUDO="sudo"
+ fi
+}