mirror of
https://github.com/harish2704/installer-scripts.git
synced 2026-09-10 06:11:08 +00:00
Remove already existing file before creating links to .local/bin
This commit is contained in:
@@ -33,9 +33,11 @@ updateBinLinks(){
|
||||
cd $localBinDir;
|
||||
for i in $(find "$appDir" -name 'binaries.lst'); do
|
||||
for f in $(cat $i);do
|
||||
if [ ! -L "./$(basename $f)" ]; then
|
||||
ln -s $(dirname $i)/$f ./;
|
||||
if [ -e "./$(basename $f)" ]; then
|
||||
echo "Removing already existing file $(basename $f)"
|
||||
rm "./$(basename $f)";
|
||||
fi
|
||||
ln -s $(dirname $i)/$f ./;
|
||||
done;
|
||||
done;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user