Menu

bacon-fossil-manjaro

big-bass

Install the latest BaCon using fossil
made easy using a shell script

this is the Manjaro version on the Raspberry pi3 but would work on any Archlinux base
pre install dependencies

sudo pacman -Syu clang curl enscript xterm indent flex  gtksourceview3 fltk ksh make pkg-config

name this fossil-get place it in the home directory

#!/bin/bash
# if you run this as a standalone script first copy it to your home directory
# now requires a dir option --workdir 
# this is an updated version of the fossil get from vovchik
# Oct 14 Manjaro rpi3 bigbass
# added a fix for speed using ksh suggested by Peter
# changed folder to use BACON-FOSSIL

# added bacon update and a check to see if you are updated to the most 
# recent changes

# catch dependencies you should have a bacon version installed already
# fossil builds are for testing new features not yet in the official release

# two problems were the reason I made this script
# the default ksh on rpi3 bulleye is outdated and broken
# that fails in the build of bacon we force a new install of ksh

# the second problem was fossil changed its options and requires a folder now
# for several years this worked fine without the need a special folder for bacon fossil

# as of https://www2.fossil-scm.org/home/doc/trunk/www/changes.wiki#v2_12
# Enhance the fossil open command with the new --workdir option
# and the ability to accept a URL as the repository name, 
# causing the remote repository to be cloned automatically. 
# Do not allow "fossil open" to open in a non-empty working directory 
# unless the --keep option or the new --force option is used.



#the default installed  ksh is badly broken install this
sudo pacman -S ksh



FILE3=/usr/bin/fossil

if test -f "$FILE3"; then
        echo " fossil exists. OK"

    else 
        echo "Will install it "
        sudo pacman -S fossil
fi





FILE=~/BACON-FOSSIL/.fslckout

if test -f "$FILE"; then
        echo "$FILE exists. and bacon_trunk will be UPDATED"
        cd ~/BACON-FOSSIL

        if fossil update | grep "changes:      None. Already up-to-date"; then

            printf "Nothing to do now because  \e[0m  \e[32m you are UPDATED !\e[0m   \n"

        else
            printf "We are  \e[0m  \e[32m UPDATING !\e[0m   \n"
            fossil update
            cd bacon_trunk

            ./configure --prefix=/usr --enable-gui-fltk --with-ksh
            echo -e " Makefile was forced to ksh for you manually  --with-ksh"
            make 
            sudo make install 

        fi



else
         echo "$FILE is not there. and  "
         printf "bacon_trunk will be created  \e[0m  \e[32m FIRST TIME !\e[0m   \n"

         fossil clone http://chiselapp.com/user/bacon/repository/bacon bacon.fossil

         # if its the first time run create the BACON-FOSSIL folder
         fossil open  --workdir BACON-FOSSIL  bacon.fossil

         cd ~/BACON-FOSSIL/bacon_trunk/

         ./configure --prefix=/usr --enable-gui-fltk --with-ksh
         echo -e " Makefile was forced to ksh for you manually  --with-ksh"
         make 
         sudo make install 
fi