Currently, I have the following:
#!/bin/sh
pathlink() {
for file in "$@";
do
if [ -d "$file" ];
then
# echo "$file"
pathlink "$file/*"
else
echo '/home/buddhilw/dotfiles/'$(basename $file)
# ln -nfs /home/buddhilw/dotfiles/$(basename $directory) $directory
fi
done
}
pathlink \
/home/buddhilw/.config/* \
/home/buddhilw/.local/* \
/home/buddhilw/.bashrc
I get the following error, for every file in upper-directories,
basename: extra operand ‘/home/buddhilw/.local/quicklisp/dists’