This one is legit
This commit is contained in:
parent
84967eac60
commit
a8124e4683
14
scripts/dummy
Executable file
14
scripts/dummy
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Remplace le contenu d'un dossier par un fichier texte
|
||||||
|
# relatant son arborescense
|
||||||
|
|
||||||
|
dir="$(echo "$1" | sed 's|/\+||')"
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
TEMP=$(mktemp)
|
||||||
|
tree -a -p -D -n "$dir" > "$TEMP"
|
||||||
|
mv "$dir" "$dir.bkp"
|
||||||
|
mv "$TEMP" "$dir"
|
||||||
|
else
|
||||||
|
echo "$dir n'est pas un dossier"
|
||||||
|
fi
|
Loading…
Reference in a new issue