Move scripts dir inside hm
And remove weird path contraptions
This commit is contained in:
parent
050901da2f
commit
edeef96133
49 changed files with 2 additions and 11 deletions
16
hm/scripts/dummy
Executable file
16
hm/scripts/dummy
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash --pure
|
||||
#! nix-shell -p bash tree coreutils
|
||||
|
||||
# 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…
Add table
Add a link
Reference in a new issue