Import the linux base role.
This commit is contained in:
4
ansible/roles/base/files/cleanup_temporary_files
Normal file
4
ansible/roles/base/files/cleanup_temporary_files
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Delete temporary files on entire disk
|
||||
find / -type f -name '*.orig' -delete -or -name '*~' -delete
|
||||
5
ansible/roles/base/files/git_find_merged_branches
Normal file
5
ansible/roles/base/files/git_find_merged_branches
Normal 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
|
||||
8
ansible/roles/base/files/mount_disk_image
Normal file
8
ansible/roles/base/files/mount_disk_image
Normal 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"
|
||||
8
ansible/roles/base/files/rsyncclone
Normal file
8
ansible/roles/base/files/rsyncclone
Normal 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 "$@"
|
||||
Reference in New Issue
Block a user