dataindex: stripped redundant parent folders
parent
7bc502f914
commit
c9521eb0a6
1
.profile
1
.profile
|
@ -32,6 +32,7 @@ prependpath()
|
|||
|
||||
appendpath "${HOME}/.launchers/"
|
||||
appendpath "${HOME}/.scripts/"
|
||||
appendpath "${HOME}/.hackpool/"
|
||||
|
||||
## TeXlive
|
||||
TEXDIR="${TEXDIR:-/usr/local/texlive}"
|
||||
|
|
|
@ -5,7 +5,7 @@ DATE=
|
|||
_printhelp ()
|
||||
{
|
||||
cat<<EOF
|
||||
Usage: ${1##*/} [-f]
|
||||
Usage: ${1##*/} [-f] FOLDERS
|
||||
|
||||
Create index of folder hierarchies. This is used as a small "backup" purpose. In
|
||||
case of data loss, it is still possible to get the full file list thanks to the
|
||||
|
@ -49,7 +49,7 @@ for i ; do
|
|||
OUTPUT="${i##*/}.index"
|
||||
[ -e "$OUTPUT" ] && $OPT_NOCLOBBER && OUTPUT="${i##*/}-$(date +%F-%T).index"
|
||||
echo "$OUTPUT"
|
||||
find "$i" -type f | sort > "$OUTPUT"
|
||||
echo "## $(date +%F)" >> "$OUTPUT"
|
||||
(cd "$i" && find * -type f) | sort > "$OUTPUT"
|
||||
# echo "## $(date +%F)" >> "$OUTPUT"
|
||||
done
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
if [ $# -ne 1 ] && [ $# -ne 2 ]; then
|
||||
echo "Usage: $0 ROOTDIR [MOUNTPOINT]"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -w "$(command -v realpath)" ]; then
|
||||
echo "You need 'realpath'."
|
||||
exit
|
||||
fi
|
||||
if [ -w "$(command -v encfs)" ]; then
|
||||
echo "You need 'encfs'."
|
||||
exit
|
||||
fi
|
||||
|
||||
MOUNTPOINT="$2"
|
||||
[ $# -ne 2 ]; MOUNTPOINT="${1}_dc"
|
||||
encfs "$(realpath "$1")" "$(realpath "$MOUNTPOINT")"
|
|
@ -111,3 +111,10 @@ if [ -d "$SOURCEDIR" ]; then
|
|||
ln -snf "$SOURCEDIR/launchers" "$HOME/.launchers"
|
||||
echo
|
||||
fi
|
||||
|
||||
## Temp scripts
|
||||
if [ -d "$SOURCEDIR" ]; then
|
||||
echo "==> Hackpool"
|
||||
ln -snf "$SOURCEDIR/hackpool" "$HOME/.hackpool"
|
||||
echo
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue