From b5f690bf35b0bcf74f1b7d7605a41bac356f673f Mon Sep 17 00:00:00 2001 From: "amirhoshangi@gmail.com" Date: Mon, 29 Sep 2014 22:56:13 +0330 Subject: [PATCH 1/2] cp test -r changed to cp -r test ... in OSX arguments must be exactly after their commands. --- scripts/install_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_files.sh b/scripts/install_files.sh index 6257178..db3e76c 100644 --- a/scripts/install_files.sh +++ b/scripts/install_files.sh @@ -16,6 +16,6 @@ function do_install() { info "Install files in /usr/local/share" info "If you are not a sudoer just copy ./.build/share to /usr/local/share manually" info "and create a link to ./kuso in your /usr/local/bin/kuso" - sudo cp .build/share /usr/local/ -rv + sudo cp -r .build/share /usr/local/ sudo ln -f -s `pwd`/kuso /usr/local/bin/kuso } From b41b70c59289018e07612eb61067d19a7fbdc57b Mon Sep 17 00:00:00 2001 From: "amirhoshangi@gmail.com" Date: Mon, 29 Sep 2014 22:58:05 +0330 Subject: [PATCH 2/2] Fixing OSX sed issues. GUN/sed is different from OSX sed, this change uses OSX sed. --- scripts/make_files.sh | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/scripts/make_files.sh b/scripts/make_files.sh index aebb735..b978640 100644 --- a/scripts/make_files.sh +++ b/scripts/make_files.sh @@ -14,20 +14,23 @@ function pre_make() { rm `find kuso.d -iname "*.elc"` 2> /dev/null - rm .build -rf + rm -R .build rm ./kuso.config.el 2> /dev/null mkdir -p `pwd`/.build/ - cp ./share/ .build/ -r - cp ./conf/ .build/ -r - cp ./bin/ .build/ -r + mkdir .build/share + mkdir .build/conf + mkdir .build/bin + cp -r ./share/ .build/ + cp -r ./conf/ .build/ + cp -r ./bin/ .build/ } function do_make() { pre_make - - files=("conf/kuso.config.el" "share/applications/Kuso.desktop" "bin/kuso") + #No such place + files=("conf/kuso.config.el" "bin/kuso") read -p "Enter your full name: " fullname read -p "Enter your email address: " mail @@ -44,22 +47,23 @@ function do_make() { for file in "${files[@]}" do - cp $file ".build/$file" - sed "s/--EMAIL--/$mail/mg" -i ".build/$file" - sed "s/--FULLNAME--/$fullname/mg" -i ".build/$file" - sed "s,--WORKSPACE--,$workspace,mg" -i ".build/$file" - sed "s,--REPO--,$repo,mg" -i ".build/$file" - sed "s,--PATH--,$current_path,mg" -i ".build/$file" - sed "s,--PLUGINS--,$plugins_list,mg" -i ".build/$file" - sed "s,--VERSION--,$VERSION,mg" -i ".build/$file" + + cp $file ".build/$file" + sed -i '' -e "s|--EMAIL--|$mail|g" ".build/$file" + sed -i '' -e "s|--FULLNAME--|$fullname|g" ".build/$file" + sed -i '' -e "s|--WORKSPACE--|$workspace|g" ".build/$file" + sed -i '' -e "s|--REPO--|$repo|g" ".build/$file" + sed -i '' -e "s|--PATH--|$current_path|g" ".build/$file" + sed -i '' -e "s|--PLUGINS--|$plugins_list|g" ".build/$file" + sed -i '' -e "s|--VERSION--|$VERSION|g" ".build/$file" done post_make } function post_make() { - cp .build/conf/kuso.config.el ./ -f - cp .build/bin/kuso ./ -f + cp -r .build/conf/kuso.config.el ./ + cp -r .build/bin/kuso ./ chmod +x ./kuso # Byte compile everything echo "Compiling elisp files ..."