#!/bin/sh # Explicitly list the main files in the required order FILES=" ./main.go ./init.go ./search-engine.go ./text.go ./text-google.go ./text-librex.go ./text-brave.go ./text-duckduckgo.go ./common.go ./cache.go ./agent.go ./files.go ./files-thepiratebay.go ./files-torrentgalaxy.go ./forums.go ./get-searchxng.go ./imageproxy.go ./images.go ./images-imgur.go ./images-quant.go ./map.go ./node.go ./open-search.go ./video.go " # Find all other .go files that were not explicitly listed OTHER_GO_FILES=$(find . -name '*.go' ! -name 'main.go' ! -name 'init.go' ! -name 'search-engine.go' ! -name 'text.go' ! -name 'text-google.go' ! -name 'text-librex.go' ! -name 'text-brave.go' ! -name 'text-duckduckgo.go' ! -name 'common.go' ! -name 'cache.go' ! -name 'agent.go' ! -name 'files.go' ! -name 'files-thepiratebay.go' ! -name 'files-torrentgalaxy.go' ! -name 'forums.go' ! -name 'get-searchxng.go' ! -name 'imageproxy.go' ! -name 'images.go' ! -name 'images-imgur.go' ! -name 'images-quant.go' ! -name 'map.go' ! -name 'node.go' ! -name 'open-search.go' ! -name 'video.go' -print) # Run the Go program with the specified files first, followed by the remaining files go run $FILES $OTHER_GO_FILES