Created
May 12, 2014 05:42
-
-
Save luginbash/eab939aae92238fea48e to your computer and use it in GitHub Desktop.
FSL doesn't support zsh by default, so I patched it for installation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1066,6 +1066,7 @@ class FslInstall(object): | |
shells['ksh'] = '.profile' | |
shells['csh'] = '.cshrc' | |
shells['tcsh'] = '.cshrc' | |
+ shells['zsh'] = '.zshrc' | |
shellmap = {} | |
shellmap['bash'] = 'sh' | |
@@ -1073,6 +1074,7 @@ class FslInstall(object): | |
shellmap['tcsh'] = 'csh' | |
shellmap['sh'] = 'sh' | |
shellmap['csh'] = 'csh' | |
+ shellmap['zsh'] = 'zsh' |
Didn't work for me:
➜ ~ python Downloads/fslinstaller.py
--- FSL Installer - Version 2.0.21 ---
[Warning] Some operations of the installer require administative rights, for example installing into the default folder of /usr/local. If your account is an 'Administrator' (you have 'sudo' rights) then you will be prompted for your administrator password when necessary.
[OK] Installer is current
Where would you like to install FSL? [/usr/local]: /Users/fernando/FSL
Downloading FSL version 5.0.9 (this may take some time)
Checking download...
[OK] Download is good.
Installing FSL software...
[OK] FSL software installed.
Creating Application links...
Password:
Checking for X11 windowing system (required for FSL GUIs).
[OK] X11 software (required for FSL GUIs) is installed.
Setting up FSL software...
[FAILED] Failed to update your profile zsh with FSL settings
➜ ~
Same error: Failed to update your profile zsh with FSL settings
Mac version: macOS Sierra 10.12.3
This worked for me. Modify fslinstaller.py
as follows and then run it:
- In
def shell_config()
, addzsh
to the conditions - In
def get_profile()
, add these lines after declaring thehome
variable:
if shell == 'zsh':
profile = os.path.join(home, '.zshrc')
return profile
Let me know if that worked for you!
Thanks fepegar, this easy fix worked well!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks so much for this code! I didn't realise it would be so easy to make it compatible with zsh. They should really implement this as part of the installer code.