diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2018-08-27 18:52:53 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2018-08-27 18:52:53 +0100 |
commit | 202dc06ba35846508d8eade5b1674ed3558ddef0 (patch) | |
tree | beeaf749d7cc30635d8d44653899c04d9fd628de | |
parent | 8a48aa602acd9b5633fb512ea96bae4bf3bd029d (diff) | |
download | dotfiles-202dc06ba35846508d8eade5b1674ed3558ddef0.tar.gz dotfiles-202dc06ba35846508d8eade5b1674ed3558ddef0.zip |
Removing haskell install script
-rwxr-xr-x | install | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/install b/install deleted file mode 100755 index f2395cf..0000000 --- a/install +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env runhaskell --- -*- haskell -*- - -import System.Directory ( removeFile - , doesFileExist - , createFileLink - , pathIsSymbolicLink - , copyFile - , makeAbsolute - , getHomeDirectory - ) - -remIf :: FilePath -> IO () -remIf dest = do - res <- doesFileExist dest - resSym <- pathIsSymbolicLink dest - rem res dest - rem resSym dest - where - rem b dest - | b = removeFile dest - | otherwise = return () - -forceOp :: (FilePath -> FilePath -> IO ()) -> FilePath -> FilePath -> IO () -forceOp op src dest = do - remIf dest - fullSrc <- makeAbsolute src - homeDir <- getHomeDirectory - op fullSrc (homeDir ++ dest) - -forceCopy :: FilePath -> FilePath -> IO () -forceCopy = forceOp copyFile - -forceFileSymLink :: FilePath -> FilePath -> IO () -forceFileSymLink = forceOp createFileLink - -main :: IO () -main = do - putStrLn "Installing emacs config..." - forceCopy "./emacs/init.el" "/.emacs.d/init.el" - forceFileSymLink "./emacs/loader.org" "/.emacs.d/loader.org" - - putStrLn "Installing X config..." - forceFileSymLink "./X/.Xmodmap" "/.Xmodmap" - forceFileSymLink "./X/.Xresources" "/.Xresources" - forceFileSymLink "./X/.xinitrc" "/.xinitrc" - - putStrLn "Installing tmux config..." - forceFileSymLink "./tmux/.tmux.conf" "/.tmux.conf" - - putStrLn "Installing i3 config..." - forceFileSymLink "./i3/config" "/.config/i3/config" - - putStrLn "Installing zsh config..." - forceFileSymLink "./zsh/.zshrc" "/.zshrc" - - putStrLn "Installing isync config..." - forceFileSymLink "./isync/.mbsyncrc" "/.mbsyncrc" |