-
-
Save aszlig/29aba28bab2619d90f70f071ea704427 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
tmp="$(mktemp -d)" | |
trap ' | |
umount "$tmp/result" | |
find "$tmp" -depth -type d -exec rmdir {} + | |
' EXIT | |
mkdir "$tmp/upper" "$tmp/work" "$tmp/result" | |
bindir="$(dirname "$(readlink -e "$(command -v find)")")" | |
mount -t overlay overlay "$tmp/result" \ | |
-o "lowerdir=$bindir,upperdir=$tmp/upper,workdir=$tmp/work" | |
"$tmp/result/find" / -maxdepth 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment