adi1090x / rofi

A huge collection of Rofi based custom Applets, Launchers & Powermenus.
GNU General Public License v3.0
6.33k stars 293 forks source link

Fix handling of directory paths containing spaces in setup.sh #142

Open m1kethai opened 1 year ago

m1kethai commented 1 year ago

Fixed an issue causing the setup script to throw an error/fail if the current working directory contains any spaces.

This was the error I got when I initially ran the setup from my /Git Repo Clones folder:

┌─[mt@archdt] ~ [/home/mt/CODE/Git Repo Clones/rofi]
└─ >> <git:(master 1dabf36✱) > ./setup.sh 

[*] Installing fonts... 
    /home/mt/CODE/Git Repo Clones/rofi (y/n): ^[[Acp: cannot stat '/home/mt/CODE/Git': No such file or directory
cp: cannot stat 'Repo': No such file or directory
cp: cannot stat 'Clones/rofi/fonts/*': No such file or directory
[*] Updating font cache...

[*] Creating a backup of your rofi configs... 
[*] Installing rofi configs... 
cp: cannot stat '/home/mt/CODE/Git': No such file or directory
cp: cannot stat 'Repo': No such file or directory
cp: cannot stat 'Clones/rofi/files/*': No such file or directory
[!] Failed to install.

After applying these changes, all dir path characters are preserved throughout the script execution and the installation works as intended.