Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from machupicchubeta/move_apps_config_and_or_…
…data_dir_under_xdg_base_directory Move apps config and/or data directory under XDG Base Directory
- Loading branch information
Showing
18 changed files
with
137 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
: "${XDG_DATA_HOME:=$HOME/.local/share}" | ||
: "${RUSTUP_HOME:=$XDG_DATA_HOME/rustup}" | ||
: "${CARGO_HOME:=$XDG_DATA_HOME/cargo}" | ||
|
||
# if [[ ! -d "$HOME/.cargo/bin" ]]; then RUSTUP_INIT_SKIP_PATH_CHECK=yes rustup-init -y --no-modify-path --default-host x86_64-apple-darwin --default-toolchain stable --profile default; fi | ||
if [[ ! -d "$HOME/.cargo/bin" ]]; then RUSTUP_INIT_SKIP_PATH_CHECK=yes rustup-init -y --no-update-default-toolchain --no-modify-path; fi | ||
if [[ ! -d "$CARGO_HOME/bin" ]]; then RUSTUP_INIT_SKIP_PATH_CHECK=yes rustup-init -y --no-update-default-toolchain --no-modify-path; fi | ||
rustup update | ||
|
||
if [ "$(uname -m)" = "x86_64" ]; then | ||
: "${HOMEBREW_PREFIX:=/usr/local}" | ||
elif [ "$(uname -m)" = "arm64" ]; then | ||
: "${HOMEBREW_PREFIX:=/opt/homebrew}" | ||
fi | ||
if [[ ! -f $HOMEBREW_PREFIX/etc/bash_completion.d/rustup.bash-completion ]]; then rustup completions bash > $HOMEBREW_PREFIX/etc/bash_completion.d/rustup.bash-completion; fi | ||
if [[ ! -d "$HOME/.zfunc" ]]; then mkdir -p "$HOME/.zfunc"; fi | ||
if [[ ! -f $HOME/.zfunc/_rustup ]]; then rustup completions zsh > $HOME/.zfunc/_rustup; fi | ||
if [[ ! -f "$HOMEBREW_PREFIX/etc/bash_completion.d/rustup.bash-completion" ]]; then rustup completions bash > "$HOMEBREW_PREFIX/etc/bash_completion.d/rustup.bash-completion"; fi | ||
if [[ ! -d "$RUSTUP_HOME" ]]; then mkdir -p "$RUSTUP_HOME"; fi | ||
if [[ ! -f "$RUSTUP_HOME/completions" ]]; then rustup completions zsh > "$RUSTUP_HOME/completions"; fi |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
autoload :Base64, 'base64' | ||
autoload :CGI, 'cgi' | ||
autoload :CSV, 'csv' | ||
autoload :Digest, 'digest' | ||
autoload :ERB, 'erb' | ||
autoload :FileUtils, 'fileutils' | ||
autoload :JSON, 'json' | ||
autoload :Pathname, 'pathname' | ||
autoload :Psych, 'psych' | ||
autoload :Ripper, 'ripper' | ||
autoload :SecureRandom, 'securerandom' | ||
autoload :Shellwords, 'shellwords' | ||
autoload :StringIO, 'stringio' | ||
autoload :URI, 'uri/generic' # `autoload :URI, 'uri'` breaks Rails | ||
autoload :YAML, 'yaml' | ||
autoload :Zlib, 'zlib' | ||
|
||
IRB.conf[:USE_AUTOCOMPLETE] = false | ||
IRB.conf[:SAVE_HISTORY] = 1000 | ||
IRB.conf[:HISTORY_FILE] = File.join(ENV['XDG_DATA_HOME'], 'irb', 'history') | ||
if defined?(IRB::Color) # just for consistency | ||
clear = "\e[0m" | ||
bold = "\e[1m" | ||
green = "\e[32m" | ||
blue = "\e[34m" | ||
cyan = "\e[36m" | ||
IRB.conf[:PROMPT][:DEFAULT] = { | ||
PROMPT_I: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]> ", | ||
PROMPT_N: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]> ", | ||
PROMPT_S: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]%l ", | ||
PROMPT_C: "#{cyan}#{bold}%N#{clear}(#{green}#{bold}%m#{clear})[#{blue}%02n#{clear}:%i]* ", | ||
RETURN: "=> %s\n", | ||
} | ||
end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.