You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
316 B
Plaintext

4 years ago
#!/bin/bash
set -euo pipefail
mkdir -p .paths
for file in $@
do
dir=./$(readlink -f "$file" | xargs dirname)
name=$(basename "$file")
echo "$(readlink -f $file)"
sudo mv "$file" "$(pwd)"
sudo ln -s "$(pwd)/$name" "$file"
echo $(echo $dir | cut --complement -b 1-2) > ".paths/$name"
#echo "$name moved."
done