Import the linux base role.

This commit is contained in:
Tom Alexander
2022-10-28 01:10:07 -04:00
parent a6409f4730
commit b2ea65faab
6 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
#
# Delete temporary files on entire disk
find / -type f -name '*.orig' -delete -or -name '*~' -delete

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
#
#
git checkout -q master && git for-each-ref refs/heads/ "--format=%(refname:short)" | while read branch; do mergeBase=$(git merge-base master $branch) && [[ $(git cherry master $(git commit-tree $(git rev-parse "$branch^{tree}") -p $mergeBase -m _)) == "-"* ]] && echo "$branch"; done

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
#
# Mount a full-disk image as a loopback device so you can mount individual partitions from inside of it.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
udisksctl loop-setup -r -f "$1"

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
#
# Wrapper to set rsync flags for cloning a folder preserving attributes
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
exec rsync -aHAXS "$@"