summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2021-09-06 19:57:48 -0500
committerKyle K <kylek389@gmail.com>2021-09-06 19:57:48 -0500
commit03c9d0a48fd6e85babd13c72e45fe13a172814d2 (patch)
treec89e80201cba3ef5daa461805bbf22a863e06f4b
parentd6a009d38625c9a78705a7f8dc764532ee9fbde7 (diff)
downloadconfigs-03c9d0a48fd6e85babd13c72e45fe13a172814d2.tar.gz
configs-03c9d0a48fd6e85babd13c72e45fe13a172814d2.tar.bz2
configs-03c9d0a48fd6e85babd13c72e45fe13a172814d2.zip
tiny updates
-rw-r--r--tiny/iommu-groups.sh7
-rw-r--r--tiny/mybackup.sh3
-rw-r--r--tiny/repos-update.sh17
3 files changed, 25 insertions, 2 deletions
diff --git a/tiny/iommu-groups.sh b/tiny/iommu-groups.sh
new file mode 100644
index 0000000..bbf8de3
--- /dev/null
+++ b/tiny/iommu-groups.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+shopt -s nullglob
+for d in /sys/kernel/iommu_groups/*/devices/*; do
+ n=${d#*/iommu_groups/*}; n=${n%%/*}
+ printf 'IOMMU Group %s ' "$n"
+ lspci -nns "${d##*/}"
+done;
diff --git a/tiny/mybackup.sh b/tiny/mybackup.sh
new file mode 100644
index 0000000..b6547bb
--- /dev/null
+++ b/tiny/mybackup.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+tar --exclude=/dev --exclude=/sys --exclude=/proc --exclude=/tmp --exclude=/run --exclude=/mnt --exclude=/media --exclude=/lost+found --exclude=/boot/lost+found --exclude=/home/lost+found --exclude=/srv/lost+found --exclude=/var/lost+found --exclude=/home/kyle --exclude=/home/bitcoin --exclude=/home/dogecoin --exclude=/home/feathercoin --exclude=/home/deluge --exclude=/srv/dump --exclude=/srv/deluge --exclude=/var/cache/pacman/pkg --exclude=/var/cache/squid --exclude=/var/lib/yacy --exclude=/var/cache/minidlna --exclude=/var/abs -pcjf tiny-full-backup-$(date +%y%m%d).tar.bz2 /
diff --git a/tiny/repos-update.sh b/tiny/repos-update.sh
index 048fbc4..be89cae 100644
--- a/tiny/repos-update.sh
+++ b/tiny/repos-update.sh
@@ -1,22 +1,35 @@
#!/bin/bash
+# ToDo
+#
+# git pull submodules if .gitmodules exists?
+#
+
+
# run as kyle
if [[ $(id -u) -eq 0 ]]; then
su - kyle
fi
-declare -a REPODIRS=("repo" "repo gaming r" "repo r" "repo small projects")
+declare -a REPODIRS=("REPO" "repo" "repo crypto" "repo cs" "repo emu" "repo exploit" "repo gaming r" "repo malware" "repo r" "repo small projects" "repo webdesign" "repo rice" "repo cs edu" "repo debug-profile" "repo gitgud" "repo weeb" "repo lang tools")
for d in "${REPODIRS[@]}"; do
cd "$d"
for r in *; do
+ if [[ ! -d "$r" ]]; then
+ echo -e "skipping ${r} file as it is not a repo of known type"
+ continue
+ fi
+ # skip files like .zip or tarballs as they're not REPOs
+
echo -e "\e[00;32mUpdating ${r}\e[00m"
cd "$r"
if [[ -d ".git" ]]; then git pull; fi
if [[ -d ".svn" ]]; then svn up; fi
+ if [[ -d "CVS" ]]; then CVS_RSH="ssh" cvs update -Pd; fi
- if [[ ! $? -eq 0 ]]; then echo 'failed to update repo: ${r}'; fi
+ if [[ ! $? -eq 0 ]]; then echo "failed to update repo: ${r}"; fi
cd ../
done
cd ../