]> code.delx.au - monosys/commitdiff
Rename all the things
authorJames Bunton <jamesbunton@delx.net.au>
Fri, 15 May 2020 11:37:58 +0000 (21:37 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Fri, 15 May 2020 11:37:58 +0000 (21:37 +1000)
- aur-install -> aur-build
- checkspace now needs no arguments

45 files changed:
archpkg/aur-build [moved from aur-install with 95% similarity]
archpkg/aur-buildx [new file with mode: 0755]
archpkg/aur-check-updates [moved from aur-check-updates with 100% similarity]
archpkg/makechrootpkgx [moved from makechrootpkgx with 100% similarity]
archpkg/repo-ls [moved from repo-ls with 100% similarity]
archpkg/repo-sign [moved from repo-sign with 100% similarity]
aur-installx [deleted file]
bin/aptorphan [moved from aptorphan with 100% similarity]
bin/csv2txt [moved from csv2txt with 100% similarity]
bin/dates [moved from dates with 100% similarity]
bin/docker-cleanup [moved from docker-cleanup with 100% similarity]
bin/find-services-to-restart [moved from find-services-to-restart with 100% similarity]
bin/git-cleanup [moved from git-cleanup with 100% similarity]
bin/java-decompile-recursive [moved from java-decompile-recursive with 100% similarity]
bin/mfree [moved from mfree with 100% similarity]
bin/pacorphan [moved from pacorphan with 100% similarity]
bin/passphrasegen [moved from passphrasegen with 100% similarity]
bin/passwdgen [moved from passwdgen with 100% similarity]
bin/update-grub [moved from update-grub with 100% similarity]
bin/wifi-scan [moved from wifi-scan with 100% similarity]
bin/xmlpp [moved from xmlpp with 100% similarity]
hacks/apple-time-machine-symlink.py [moved from apple-time-machine-symlink.py with 100% similarity]
hacks/backup-mysql [moved from backup-mysql with 100% similarity]
hacks/bashttpd [moved from bashttpd with 100% similarity]
hacks/bin2ascii [moved from bin2ascii with 100% similarity]
hacks/bt-dun-connect [moved from bt-dun-connect with 100% similarity]
hacks/dnsctl [moved from dnsctl with 100% similarity]
hacks/find-in-file [moved from find-in-file with 100% similarity]
hacks/gnome-shell-raise-window [moved from gnome-shell-raise-window with 100% similarity]
hacks/lib-ext-backup [moved from lib-ext-backup with 100% similarity]
hacks/magnet [moved from magnet with 100% similarity]
hacks/make-persistent-journal [moved from make-persistent-journal with 100% similarity]
hacks/multiboot-setup [moved from multiboot-setup with 100% similarity]
hacks/opal-card-tool [moved from opal-card-tool with 100% similarity]
hacks/rename-by-date [moved from rename-by-date with 100% similarity]
hacks/rsync-ssh-backup [moved from rsync-ssh-backup with 100% similarity]
hacks/shaper [moved from shaper with 100% similarity]
hacks/smart-stats [moved from smart-stats with 100% similarity]
hacks/split-mvimg [moved from split-mvimg with 100% similarity]
hacks/ssh-screen-wrapper [moved from ssh-screen-wrapper with 100% similarity]
hacks/tcp-proxy [moved from tcp-proxy with 100% similarity]
hacks/terminal-color-table [moved from terminal-color-table with 100% similarity]
hacks/usb-reset [moved from usb-reset with 100% similarity]
hacks/wordpress-salt-gen [moved from wordpress-salt-gen with 100% similarity]
healthcheck/checkspace [moved from checkspace with 73% similarity]

similarity index 95%
rename from aur-install
rename to archpkg/aur-build
index 6c5b5a2fd5cc65ce5ff72294aa25e751f922168c..bcb3b61d89cc8bae5bb72e7a6825bb3cc6f4ffdc 100755 (executable)
@@ -11,7 +11,7 @@ fi
 shift
 MAKEPKG_CMD=("$@")
 if [ ${#MAKEPKG_CMD[@]} -eq 0 ]; then
-    MAKEPKG_CMD=("makepkg" "-sri")
+    MAKEPKG_CMD=("makepkg" "-sr")
 fi
 
 function enter_directory {
diff --git a/archpkg/aur-buildx b/archpkg/aur-buildx
new file mode 100755 (executable)
index 0000000..090f3f7
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PKGNAME="$1"
+shift
+
+exec aur-build "$PKGNAME" makechrootpkgx "$@"
similarity index 100%
rename from aur-check-updates
rename to archpkg/aur-check-updates
similarity index 100%
rename from makechrootpkgx
rename to archpkg/makechrootpkgx
similarity index 100%
rename from repo-ls
rename to archpkg/repo-ls
similarity index 100%
rename from repo-sign
rename to archpkg/repo-sign
diff --git a/aur-installx b/aur-installx
deleted file mode 100755 (executable)
index d6af65d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-PKGNAME="$1"
-shift
-
-exec aur-install "$PKGNAME" makechrootpkgx "$@"
similarity index 100%
rename from aptorphan
rename to bin/aptorphan
similarity index 100%
rename from csv2txt
rename to bin/csv2txt
diff --git a/dates b/bin/dates
similarity index 100%
rename from dates
rename to bin/dates
similarity index 100%
rename from docker-cleanup
rename to bin/docker-cleanup
similarity index 100%
rename from git-cleanup
rename to bin/git-cleanup
diff --git a/mfree b/bin/mfree
similarity index 100%
rename from mfree
rename to bin/mfree
similarity index 100%
rename from pacorphan
rename to bin/pacorphan
similarity index 100%
rename from passphrasegen
rename to bin/passphrasegen
similarity index 100%
rename from passwdgen
rename to bin/passwdgen
similarity index 100%
rename from update-grub
rename to bin/update-grub
similarity index 100%
rename from wifi-scan
rename to bin/wifi-scan
diff --git a/xmlpp b/bin/xmlpp
similarity index 100%
rename from xmlpp
rename to bin/xmlpp
similarity index 100%
rename from backup-mysql
rename to hacks/backup-mysql
similarity index 100%
rename from bashttpd
rename to hacks/bashttpd
similarity index 100%
rename from bin2ascii
rename to hacks/bin2ascii
similarity index 100%
rename from bt-dun-connect
rename to hacks/bt-dun-connect
similarity index 100%
rename from dnsctl
rename to hacks/dnsctl
similarity index 100%
rename from find-in-file
rename to hacks/find-in-file
similarity index 100%
rename from lib-ext-backup
rename to hacks/lib-ext-backup
similarity index 100%
rename from magnet
rename to hacks/magnet
similarity index 100%
rename from multiboot-setup
rename to hacks/multiboot-setup
similarity index 100%
rename from opal-card-tool
rename to hacks/opal-card-tool
similarity index 100%
rename from rename-by-date
rename to hacks/rename-by-date
similarity index 100%
rename from rsync-ssh-backup
rename to hacks/rsync-ssh-backup
similarity index 100%
rename from shaper
rename to hacks/shaper
similarity index 100%
rename from smart-stats
rename to hacks/smart-stats
similarity index 100%
rename from split-mvimg
rename to hacks/split-mvimg
similarity index 100%
rename from ssh-screen-wrapper
rename to hacks/ssh-screen-wrapper
similarity index 100%
rename from tcp-proxy
rename to hacks/tcp-proxy
similarity index 100%
rename from usb-reset
rename to hacks/usb-reset
similarity index 100%
rename from wordpress-salt-gen
rename to hacks/wordpress-salt-gen
similarity index 73%
rename from checkspace
rename to healthcheck/checkspace
index 061263a2f25371d3e9f396e67eb38797a43d2c9f..468b74917d79461a10acec635c8007dcdc3a4a2e 100755 (executable)
@@ -27,12 +27,17 @@ def check_path(path):
     if warn:
         print("WARNING! %s has only %s remaining" % (path, pp_size(free)))
 
+def read_fstab():
+    for line in open("/etc/fstab"):
+        if line.startswith("#"):
+            continue
+        _, path, _ = line.split(maxsplit=2)
+        if path.startswith("/"):
+            yield path
 
 def main():
-    paths = sys.argv[1:]
-    if not paths:
-        print("Usage: %s path" % sys.argv[0])
-        sys.exit(1)
+    paths = set(["/"])
+    paths.update(read_fstab())
     for path in paths:
         check_path(path)