updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / factor-git / f
blobf2f7e2e7c7fab232368fe86d22b98cd13a7c7e48
1 #!/bin/sh
3 __bootstrap() {
4 cd ~/.factor
5 ln -sf /usr/share/factor/boot.image .
6 f-bin -i=boot.image
7 mv f-bin.image factor.image
8 rm boot.image
11 [ ! -d ~/.factor ] && mkdir -p ~/.factor
12 [ ! -h ~/.factor/libs ] && ln -sf /usr/lib/factor/* ~/.factor/
14 bootmtime=$(stat -c="%Y" /usr/share/factor/boot.image)
16 if [ -f ~/.factor/factor.image ]; then
17 imagemtime=$(stat -c="%Y" ~/.factor/factor.image)
18 if [ -f ~/.factor-boot-rc ]; then
19 brcmtime=$(stat -c="%Y" ~/.factor-boot-rc)
20 ( [ ${brcmtime#=} -gt ${imagemtime#=} ] \
21 || [ ${bootmtime#=} -gt ${imagemtime#=} ] \
22 ) && __bootstrap
23 else
24 [ ${bootmtime#=} -gt ${imagemtime#=} ] && __bootstrap
26 else
27 __bootstrap
30 /usr/bin/f-bin -i=$HOME/.factor/factor.image $*