/shlomif-settings/Bash/Themes/themes/lm-solve/source.bash
BASH | 108 lines | 73 code | 17 blank | 18 comment | 3 complexity | fa8f67479ba83d6a8ff8009be69bd82a MD5 | raw file
- load_common mymake
- load_common completion
- load_common prompt
- base="$HOME/progs/perl/mazes"
- hg_base="$base/hg"
- trunk="$hg_base/lm-solve-source"
- this="$trunk"
- PATH="$inst_modules_dir/bin/:$PATH"
- setup()
- {
- (
- if ! test -d "$this" ; then
- mkdir -p "$hg_base"
- cd "$hg_base"
- hg clone 'ssh://hg@bitbucket.org/shlomif/lm-solve-source'
- fi
- cd "$this"
- )
- }
- # Make sure that gvim's filename completion ignores filenames that it should
- # not edit.
- __dist_name()
- {
- (__check_for_distro &&
- cat META.yml | grep "^name:" | sed 's/^name: *//'
- )
- }
- __version()
- {
- (__check_for_distro &&
- cat META.yml | grep "^version:" | sed 's/^version: *//'
- )
- }
- __check_for_distro()
- {
- if [ -e "META.yml" ] ; then
- return 0
- else
- echo "Not a distro dir" 1>&2
- return 1
- fi
- }
- __test_distribution()
- {
- __check_for_distro &&
- (
- make disttest
- rm -fr "$(__dist_name)-$(__version)"
- )
- }
- cd $this
- __install_to_temp()
- {
- (
- make -f "$modules_makefile" "$(pwd)"
- )
- }
- # (
- # if [ -e Makefile.PL ] ; then
- # perl Makefile.PL PREFIX="$inst_modules_dir"
- # make
- # make test
- # make install
- # elif [ -e Build.PL ] ; then
- # perl Build.PL
- # ./Build
- # ./Build test
- # ./Build install prefix="$inst_modules_dir"
- # else
- # echo "Unknown instamethod" 1>&2
- # exit 1
- # fi
- # )
- __prepare_install_all_to_temp_makefile()
- {
- (cd "$build_scripts_dir" && perl create-makefile.pl)
- }
- __install_all_to_temp()
- {
- (
- make -f "$modules_makefile" all
- )
- }
- prompt()
- {
- __prompt_cmd \
- "\$trunk=$trunk" \
- "\$base=$base" \
- "~=$HOME"
- }
- proj_name='lm-solve';