diff --git a/.gitignore b/.gitignore index 9befb8c..8501e3b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ kuso.config.el kuso.d/* .build/* *~ +build.log diff --git a/bin/kuso b/bin/kuso new file mode 100644 index 0000000..93c976f --- /dev/null +++ b/bin/kuso @@ -0,0 +1,3 @@ +#! /bin/sh + +emacs -Q --no-splash --name KusoIDE --title KusoIDE -q -l --PATH--/kuso.config.el "$@" diff --git a/kuso b/kuso deleted file mode 100755 index 7529e76..0000000 --- a/kuso +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -emacs -Q --no-splash --name KusoIDE --title KusoIDE -q -l `dirname $0`/kuso.config.el "$@" diff --git a/scripts/check_dep.sh b/scripts/check_dep.sh index a5001a7..e80dc28 100644 --- a/scripts/check_dep.sh +++ b/scripts/check_dep.sh @@ -134,6 +134,7 @@ function do_check() { check_dep 'ruby' 'You need to install it from your package manager or from source' check_dep 'rake' 'Install it using "gem install rake"' check_dep 'bundle' 'Install it using "gem install bundler"' + check_dep 'rubocop' 'Install it using "gem install rubocop"' fi if [[ "${selected_plugins[*]}" == *"kuso-web"* ]] 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 } diff --git a/scripts/make_files.sh b/scripts/make_files.sh index c152e84..b978640 100644 --- a/scripts/make_files.sh +++ b/scripts/make_files.sh @@ -14,19 +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 + 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") + #No such place + files=("conf/kuso.config.el" "bin/kuso") read -p "Enter your full name: " fullname read -p "Enter your email address: " mail @@ -43,22 +47,26 @@ 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 -r .build/conf/kuso.config.el ./ + cp -r .build/bin/kuso ./ + chmod +x ./kuso # Byte compile everything - emacs --batch --eval "(byte-recompile-directory \"./kuso.d/\" 0)" -Q -l kuso.config.el > ./build.log + echo "Compiling elisp files ..." + emacs --batch --eval "(byte-recompile-directory \"./kuso.d/\" 0)" -Q -l kuso.config.el 2> ./build.log }