From de51442d4368c7a8fa14ba8b033789390174680f Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 10 Feb 2020 16:20:27 +0800 Subject: update --- alias | 7 ++++--- scripts/osm/osm | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/alias b/alias index 262f07c..8f4a9ca 100644 --- a/alias +++ b/alias @@ -69,7 +69,9 @@ alias cdV='cd ~/Videos' alias cdP='cd ~/Pictures' # github -alias hub="GITHUB_TOKEN=$(cat $SETTING_DIR/tokens/github) hub" +GITHUB_API='https://api.github.com' +GITHUB_API_TOKEN=$(cat $SETTING_DIR/tokens/github 2>/dev/null) +alias hub="GITHUB_TOKEN=$GITHUB_API_TOKEN hub" alias github_token='xdg-open https://github.com/settings/tokens' github() { xdg-open https://github.com/$1/$2 @@ -125,7 +127,7 @@ alias gls='git log -S' alias cdgw='cd .github/workflows' alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule github_release_asset() { - command="upload-github-release-asset.sh\n github_api_token=$(cat ~/settings/tokens/github)\n owner=typebrook\n repo=tig\n tag=LATEST\n filename=$(which tig)\n overwrite=false" + command="upload-github-release-asset.sh\n github_api_token=$GITHUB_API_TOKEN\n owner=typebrook\n repo=tig\n tag=LATEST\n filename=$(which tig)\n overwrite=false" prompt "$command" } @@ -263,7 +265,6 @@ alias cdand='cd ~/git/sample' alias cdm='cd ~/git/sharkbig.github.io/rescue' alias cdmw='cd ~/git/sharkbig.github.io/.github/workflows' -GITHUB_API='https://api.github.com' TAIWAN_BBOX='118.1036,20.72799,122.9312,26.60305' TAIWAN_BBOX_V='20.72799,118.1036,26.60305,122.9312' TAIPEI_BBOX='121.346,24.926,121.676,25.209' diff --git a/scripts/osm/osm b/scripts/osm/osm index 671d639..a595fb7 100644 --- a/scripts/osm/osm +++ b/scripts/osm/osm @@ -4,7 +4,7 @@ export OSM_SERVER=https://api.openstreetmap.org export OSM_API=$OSM_SERVER/api/0.6 -export OSM_USER_PASSWD=$(cat $SETTING_DIR/tokens/osm) +export OSM_USER_PASSWD=$(cat $SETTING_DIR/tokens/osm 2>/dev/null) FILENAME=$0 -- cgit v1.2.3-70-g09d2