8000 polybar/build.sh at master · julio-b/polybar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"cmake","path":"cmake","contentType":"directory"},{"name":"common","path":"common","contentType":"directory"},{"name":"contrib","path":"contrib","contentType":"directory"},{"name":"doc","path":"doc","contentType":"directory"},{"name":"include","path":"include","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".clang-format","path":".clang-format","contentType":"file"},{"name":".clang-tidy","path":".clang-tidy","contentType":"file"},{"name":".codecov.yml","path":".codecov.yml","contentType":"file"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".gitmodules","path":".gitmodules","contentType":"file"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":".valgrind-suppressions","path":".valgrind-suppressions","contentType":"file"},{"name":".ycm_extra_conf.py","path":".ycm_extra_conf.py","contentType":"file"},{"name":"CMakeLists.txt","path":"CMakeLists.txt","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SUPPORT.md","path":"SUPPORT.md","contentType":"file"},{"name":"banner.png","path":"banner.png","contentType":"file"},{"name":"build.sh","path":"build.sh","contentType":"file"},{"name":"config.cmake","path":"config.cmake","contentType":"file"},{"name":"version.txt","path":"version.txt","contentType":"file"}],"totalCount":26}},"fileTreeProcessingTime":10.084355,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":153198706,"defaultBranch":"master","name":"polybar","ownerLogin":"julio-b","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-10-16T00:24:51.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/16379308?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1570485574.0","canEdit":false,"refType":"branch","currentOid":"1fc69424827480402a4df29b66c511214326200c"},"path":"build.sh","currentUser":null,"blob":{"rawLines":["#!/usr/bin/env bash","","readonly SELF=${0##*/}","declare -rA COLORS=("," [RED]=$'\\033[0;31m'"," [GREEN]=$'\\033[0;32m'"," [BLUE]=$'\\033[0;34m'"," [PURPLE]=$'\\033[0;35m'"," [CYAN]=$'\\033[0;36m'"," [WHITE]=$'\\033[0;37m'"," [YELLOW]=$'\\033[0;33m'"," [BOLD]=$'\\033[1m'"," [OFF]=$'\\033[0m'",")","","usage() {"," echo \""," Builds and installs polybar.",""," ${COLORS[GREEN]}${COLORS[BOLD]}Usage:${COLORS[OFF]}"," ${COLORS[CYAN]}${SELF}${COLORS[OFF]} [options]",""," ${COLORS[GREEN]}${COLORS[BOLD]}Options:${COLORS[OFF]}"," ${COLORS[GREEN]}-3, --i3${COLORS[OFF]}"," Include support for internal/i3 (requires i3); disabled by default."," ${COLORS[GREEN]}-a, --alsa${COLORS[OFF]}"," Include support for internal/alsa (requires alsalib); disabled by default."," ${COLORS[GREEN]}-p, --pulseaudio${COLORS[OFF]}"," Include support for internal/pulseaudio (requires libpulse); disabled by default."," ${COLORS[GREEN]}-n, --network${COLORS[OFF]}"," Include support for internal/network (requires libnl/libiw); disabled by default."," ${COLORS[GREEN]}-m, --mpd${COLORS[OFF]}"," Include support for internal/mpd (requires libmpdclient); disabled by default."," ${COLORS[GREEN]}-c, --curl${COLORS[OFF]}"," Include support for internal/github (requires libcurl); disabled by default."," ${COLORS[GREEN]}-i, --ipc${COLORS[OFF]}"," Build polybar-msg used to send ipc messages; disabled by default."," ${COLORS[GREEN]}--all-features${COLORS[OFF]}"," Enable all abovementioned features;"," equal to -3 -a -p -n -m -c -i"," ${COLORS[GREEN]}-g, --gcc${COLORS[OFF]}"," Use GCC even if Clang is installed; disabled by default."," ${COLORS[GREEN]}-f${COLORS[OFF]}"," Remove existing build dir; disabled by default."," ${COLORS[GREEN]}-I, --no-install${COLORS[OFF]}"," Do not execute 'sudo make install'; enabled by default."," ${COLORS[GREEN]}-C, --install-config${COLORS[OFF]}"," Install example configuration; disabled by default."," ${COLORS[GREEN]}-A, --auto${COLORS[OFF]}"," Automatic, non-interactive installation; disabled by default."," When set, script defaults options not explicitly set."," ${COLORS[GREEN]}-h, --help${COLORS[OFF]}"," Displays this help.","\"","}","","msg_err() {"," echo -e \"${COLORS[RED]}${COLORS[BOLD]}** ${COLORS[OFF]}$*\\n\""," exit 1","}","","msg() {"," echo -e \"${COLORS[GREEN]}${COLORS[BOLD]}** ${COLORS[OFF]}$*\\n\"","}","","install() {"," local p",""," if [[ \"$AUTO\" == ON ]]; then"," [[ -z \"$INSTALL\" ]] \u0026\u0026 INSTALL=\"ON\""," [[ -z \"$INSTALL_CONF\" ]] \u0026\u0026 INSTALL_CONF=\"OFF\""," fi",""," if [[ -z \"$INSTALL\" ]]; then"," read -r -p \"$(msg \"Execute 'sudo make install'? [Y/n] \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"N\" ]] \u0026\u0026 INSTALL=\"ON\" || INSTALL=\"OFF\""," fi",""," if [[ -z \"$INSTALL_CONF\" ]]; then"," read -r -p \"$(msg \"Install example configuration? [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 INSTALL_CONF=\"OFF\" || INSTALL_CONF=\"ON\""," fi","",""," if [[ \"$INSTALL\" == ON ]]; then"," sudo make install || msg_err \"Failed to install executables...\""," fi",""," if [[ \"$INSTALL_CONF\" == ON ]]; then"," make userconfig || msg_err \"Failed to install user configuration...\""," fi","}","","set_build_opts() {"," local p",""," msg \"Setting build options\"",""," if [[ \"$AUTO\" == ON ]]; then"," [[ -z \"$USE_GCC\" ]] \u0026\u0026 USE_GCC=\"OFF\""," [[ -z \"$ENABLE_I3\" ]] \u0026\u0026 ENABLE_I3=\"OFF\""," [[ -z \"$ENABLE_ALSA\" ]] \u0026\u0026 ENABLE_ALSA=\"OFF\""," [[ -z \"$ENABLE_PULSEAUDIO\" ]] \u0026\u0026 ENABLE_PULSEAUDIO=\"OFF\""," [[ -z \"$ENABLE_NETWORK\" ]] \u0026\u0026 ENABLE_NETWORK=\"OFF\""," [[ -z \"$ENABLE_MPD\" ]] \u0026\u0026 ENABLE_MPD=\"OFF\""," [[ -z \"$ENABLE_CURL\" ]] \u0026\u0026 ENABLE_CURL=\"OFF\""," [[ -z \"$ENABLE_IPC_MSG\" ]] \u0026\u0026 ENABLE_IPC_MSG=\"OFF\""," fi",""," if [[ -z \"$USE_GCC\" ]]; then"," read -r -p \"$(msg \"Use GCC even if Clang is installed ----------------------------- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 USE_GCC=\"OFF\" || USE_GCC=\"ON\""," fi",""," if [[ -z \"$ENABLE_I3\" ]]; then"," read -r -p \"$(msg \"Include support for \\\"internal/i3\\\" (requires i3) ---------------- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_I3=\"OFF\" || ENABLE_I3=\"ON\""," fi",""," if [[ -z \"$ENABLE_ALSA\" ]]; then"," read -r -p \"$(msg \"Include support for \\\"internal/alsa\\\" (requires alsalib) --------- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_ALSA=\"OFF\" || ENABLE_ALSA=\"ON\""," fi",""," if [[ -z \"$ENABLE_PULSEAUDIO\" ]]; then"," read -r -p \"$(msg \"Include support for \\\"internal/pulseaudio\\\" (requires libpulse) -- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_PULSEAUDIO=\"OFF\" || ENABLE_PULSEAUDIO=\"ON\""," fi",""," if [[ -z \"$ENABLE_NETWORK\" ]]; then"," read -r -p \"$(msg \"Include support for \\\"internal/network\\\" (requires libnl/libiw) -- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_NETWORK=\"OFF\" || ENABLE_NETWORK=\"ON\""," fi",""," if [[ -z \"$ENABLE_MPD\" ]]; then"," read -r -p \"$(msg \"Include support for \\\"internal/mpd\\\" (requires libmpdclient) ----- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_MPD=\"OFF\" || ENABLE_MPD=\"ON\""," fi",""," if [[ -z \"$ENABLE_CURL\" ]]; then"," read -r -p \"$(msg \"Include support for \\\"internal/github\\\" (requires libcurl) ------- [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_CURL=\"OFF\" || ENABLE_CURL=\"ON\""," fi",""," if [[ -z \"$ENABLE_IPC_MSG\" ]]; then"," read -r -p \"$(msg \"Build \\\"polybar-msg\\\" used to send ipc messages ------------------ [y/N]: \")\" -n 1 p \u0026\u0026 echo"," [[ \"${p^^}\" != \"Y\" ]] \u0026\u0026 ENABLE_IPC_MSG=\"OFF\" || ENABLE_IPC_MSG=\"ON\""," fi","",""," CXX=\"c++\"",""," if [[ \"$USE_GCC\" == OFF ]]; then"," if command -v clang++ \u003e/dev/null; then"," msg \"Using compiler: clang++/clang\""," CXX=\"clang++\""," elif command -v g++ \u003e/dev/null; then"," msg \"Using compiler: g++/gcc\""," CXX=\"g++\""," fi"," else"," CXX=\"g++\""," fi","}","","main() {"," [[ -d ./.git ]] \u0026\u0026 {"," msg \"Fetching submodules\""," git submodule update --init --recursive || msg_err \"Failed to clone submodules\""," }",""," [[ -d ./build ]] \u0026\u0026 {"," if [[ \"$REMOVE_BUILD_DIR\" == ON ]]; then"," msg \"Removing existing build dir (-f)\""," rm -rf ./build \u003e/dev/null || msg_err \"Failed to remove existing build dir\""," else"," msg \"A build dir already exists (pass -f to replace)\""," fi"," }",""," mkdir -p ./build || msg_err \"Failed to create build dir\""," cd ./build || msg_err \"Failed to enter build dir\"",""," set_build_opts",""," msg \"Executing cmake command\""," cmake \\"," -DCMAKE_CXX_COMPILER=\"${CXX}\" \\"," -DENABLE_ALSA:BOOL=\"${ENABLE_ALSA}\" \\"," -DENABLE_PULSEAUDIO:BOOL=\"${ENABLE_PULSEAUDIO}\"\\"," -DENABLE_I3:BOOL=\"${ENABLE_I3}\" \\"," -DENABLE_MPD:BOOL=\"${ENABLE_MPD}\" \\"," -DENABLE_NETWORK:BOOL=\"${ENABLE_NETWORK}\" \\"," -DENABLE_CURL:BOOL=\"${ENABLE_CURL}\" \\"," -DBUILD_IPC_MSG:BOOL=\"${ENABLE_IPC_MSG}\" \\"," .. || msg_err \"Failed to generate build... read output to get a hint of what went wrong\"",""," msg \"Building project\""," make || msg_err \"Failed to build project\""," install"," msg \"Build complete!\"",""," exit 0","}","","","#################","###### Entry","#################","while [[ \"$1\" == -* ]]; do"," case \"$1\" in"," -3|--i3)"," ENABLE_I3=ON; shift ;;"," -a|--alsa)"," ENABLE_ALSA=ON; shift ;;"," -p|--pulseaudio)"," ENABLE_PULSEAUDIO=ON; shift ;;"," -n|--network)"," ENABLE_NETWORK=ON; shift ;;"," -m|--mpd)"," ENABLE_MPD=ON; shift ;;"," -c|--curl)"," ENABLE_CURL=ON; shift ;;"," -i|--ipc)"," ENABLE_IPC_MSG=ON; shift ;;"," --all-features)"," ENABLE_I3=ON"," ENABLE_ALSA=ON"," ENABLE_PULSEAUDIO=ON"," ENABLE_NETWORK=ON"," ENABLE_MPD=ON"," ENABLE_CURL=ON"," ENABLE_IPC_MSG=ON"," shift ;;",""," -g|--gcc)"," USE_GCC=ON; shift ;;"," -f)"," REMOVE_BUILD_DIR=ON; shift ;;"," -I|--no-install)"," INSTALL=OFF; shift ;;"," -C|--install-config)"," INSTALL_CONF=ON; shift ;;"," -A|--auto)"," AUTO=ON; shift ;;"," -h|--help)"," usage"," exit 0"," ;;"," --) shift; break ;;"," *)"," usage"," [[ \"$1\" =~ ^-[0-9a-zA-Z]{2,}$ ]] \u0026\u0026 msg_err \"don't combine options: ie do [-c -i] instead of [-ci]\" || msg_err \"unknown option [$1]\""," ;;"," esac","done","","main"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/julio-b/polybar/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"build.sh","displayUrl":"https://github.com/julio-b/polybar/blob/master/build.sh?raw=true","headerInfo":{"blobSize":"7.92 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"07fe2f1","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fjulio-b%2Fpolybar%2Fblob%2Fmaster%2Fbuild.sh","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"259","truncatedSloc":"220"},"mode":"executable file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Shell","languageID":346,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/julio-b/polybar/blob/master/build.sh","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/julio-b/polybar/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/julio-b/polybar/raw/refs/heads/master/build.sh","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"usage","kind":"function","ident_start":273,"ident_end":278,"extent_start":273,"extent_end":2269,"fully_qualified_name":"usage","ident_utf16":{"start":{"line_number":15,"utf16_col":0},"end":{"line_number":15,"utf16_col":5}},"extent_utf16":{"start":{"line_number":15,"utf16_col":0},"end":{"line_number":54,"utf16_col":1}}},{"name":"msg_err","kind":"function","ident_start":2271,"ident_end":2278,"extent_start":2271,"extent_end":2356,"fully_qualified_name":"msg_err","ident_utf16":{"start":{"line_number":56,"utf16_col":0},"end":{"line_number":56,"utf16_col":7}},"extent_utf16":{"start":{"line_number":56,"utf16_col":0},"end":{"line_number":59,"utf16_col":1}}},{"name":"msg","kind":"function","ident_start":2358,"ident_end":2361,"extent_start":2358,"extent_end":2432,"fully_qualified_name":"msg","ident_utf16":{"start":{"line_number":61,"utf16_col":0},"end":{"line_number":61,"utf16_col":3}},"extent_utf16":{"start":{"line_number":61,"utf16_col":0},"end":{"line_number":63,"utf16_col":1}}},{"name":"install","kind":"function","ident_start":2434,"ident_end":2441,"extent_start":2434,"extent_end":3176,"fully_qualified_name":"install","ident_utf16":{"start":{"line_number":65,"utf16_col":0},"end":{"line_number":65,"utf16_col":7}},"extent_utf16":{"start":{"line_number":65,"utf16_col":0},"end":{"line_number":91,"utf16_col":1}}},{"name":"set_build_opts","kind":"function","ident_start":3178,"ident_end":3192,"extent_start":3178,"extent_end":5764,"fully_qualified_name":"set_build_opts","ident_utf16":{"start":{"line_number":93,"utf16_col":0},"end":{"line_number":93,"utf16_col":14}},"extent_utf16":{"start":{"line_number":93,"utf16_col":0},"end":{"line_number":163,"utf16_col":1}}},{"name":"main","kind":"function","ident_start":5766,"ident_end":5770,"extent_start":5766,"extent_end":7001,"fully_qualified_name":"main","ident_utf16":{"start":{"line_number":165,"utf16_col":0},"end":{"line_number":165,"utf16_col":4}},"extent_utf16":{"start":{"line_number":165,"utf16_col":0},"end":{"line_number":203,"utf16_col":1}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/julio-b/polybar/branches":{"post":"w7-r8JvazUer9KmJbZeN4Ie3_cO4VwbJxH5NMbbY7U-BF-3I5giPUFZDY6NPzxLdtNu8MGIIrigQMGiHAM1Axg"},"/repos/preferences":{"post":"V7g8psElNwcY11Qr-_MC3vn8AsjAckwXM8T1IAlfkA3Z3mJl3EocDUoGbaels83kbMhxY_a0qliMAwsZyWD6CA"}}},"title":"polybar/build.sh at master · julio-b/polybar","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0