Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (13 sloc) 249 Bytes
#!/bin/bash
dest=/usr/local/bin
dotmatch='\./(.+)\.(.+)'
dotbase=''
for file in ./*.*
do
if [[ $file =~ $dotmatch ]]
then
dotbase="${BASH_REMATCH[1]}"
cp `pwd`/$file $dest/$dotbase
chmod 0755 $dest/$dotbase
fi
done