]> gitweb.factorcode.org Git - factor.git/blobdiff - build.sh
Redirect when using curl
[factor.git] / build.sh
index 84d8b22aa4eb4ebfa8bc9f308a125748b41452d7..fba998ee4ec15461e29ab0e2dd618b762b664273 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -98,7 +98,7 @@ set_downloader() {
     fi
     test_program_installed curl
     if [[ $? -ne 0 ]] ; then
-        DOWNLOADER="curl -f -O"
+        DOWNLOADER="curl -L -f -O"
         DOWNLOADER_NAME=curl
         return
     fi
@@ -357,6 +357,7 @@ echo_build_info() {
     $ECHO NUM_CORES=$NUM_CORES
     $ECHO WORD=$WORD
     $ECHO DEBUG=$DEBUG
+    $ECHO REPRODUCIBLE=$REPRODUCIBLE
     $ECHO CURRENT_BRANCH=$CURRENT_BRANCH
     $ECHO FACTOR_BINARY=$FACTOR_BINARY
     $ECHO FACTOR_LIBRARY=$FACTOR_LIBRARY
@@ -685,7 +686,7 @@ make_boot_image() {
 }
 
 install_deps_apt() {
-    sudo apt install --yes libc6-dev libpango1.0-dev libx11-dev xorg-dev libgtk2.0-dev gtk2-engines-pixbuf libgtkglext1-dev wget git git-doc rlwrap clang gcc make screen tmux libssl-dev g++
+    sudo apt install --yes libc6-dev libpango1.0-dev libx11-dev xorg-dev libgtk2.0-dev gtk2-engines-pixbuf libgtkglext1-dev wget git git-doc rlwrap clang make screen tmux libssl-dev
     check_ret sudo
 }
 
@@ -700,7 +701,7 @@ install_deps_dnf() {
 }
 
 install_deps_pkg() {
-    sudo pkg install --yes git gcc rlwrap ripgrep curl gmake x11-toolkits/gtk30 x11-toolkits/gtkglext pango cairo
+    sudo pkg install --yes git gmake gcc rlwrap ripgrep curl gmake x11-toolkits/gtk30 x11-toolkits/gtkglext pango cairo vim
 }
 
 
@@ -728,10 +729,12 @@ usage() {
     $ECHO "  self-update - git pull, recompile, make local boot image, bootstrap"
     $ECHO "  quick-update - git pull, refresh-all, save"
     $ECHO "  update|latest - git pull, recompile, download a boot image, bootstrap"
+    $ECHO "  compile - compile the binary"
+    $ECHO "  recompile - recompile the binary"
     $ECHO "  bootstrap - bootstrap with existing boot image"
     $ECHO "  net-bootstrap - recompile, download a boot image, bootstrap"
     $ECHO "  make-target - find and print the os-arch-cpu string"
-    $ECHO "  report - print the build variables"
+    $ECHO "  report|info - print the build variables"
     $ECHO "  update-boot-image - get the boot image for the current branch of for master"
     $ECHO ""
     $ECHO "If you are behind a firewall, invoke as:"
@@ -748,6 +751,13 @@ if [[ -n "$2" ]] ; then
     parse_build_info $2
 fi
 
+if [ "$#" -gt 3 ]; then
+       usage
+    $ECHO "error: too many arguments"
+    exit 1
+fi
+
+
 set_copy
 set_delete
 
@@ -760,13 +770,13 @@ case "$1" in
     deps-pkg) install_deps_pkg ;;
     self-update) update; make_boot_image; bootstrap;;
     quick-update) update; refresh_image ;;
-    update) update; download_and_bootstrap ;;
-    latest) update; download_and_bootstrap ;;
+    update|latest) update; download_and_bootstrap ;;
     compile) find_build_info; make_factor ;;
+    recompile) find_build_info; make_clean; make_factor ;;
     bootstrap) get_config_info; bootstrap ;;
     net-bootstrap) net_bootstrap_no_pull ;;
     make-target) FIND_MAKE_TARGET=true; ECHO=false; find_build_info; exit_script ;;
-    report) find_build_info ;;
+    report|info) find_build_info ;;
     full-report) find_build_info; check_installed_programs; check_libraries ;;
     update-boot-image) find_build_info; check_installed_programs; update_boot_image;;
     *) usage ;;