mirror of
https://github.com/Mayccoll/Gogh.git
synced 2023-08-10 21:12:46 +03:00
Fix typos
This commit is contained in:
parent
ca5c0146e2
commit
3b6c20478b
21
gogh.sh
21
gogh.sh
@ -166,15 +166,15 @@ declare -a THEMES=(
|
|||||||
'zenburn.sh'
|
'zenburn.sh'
|
||||||
)
|
)
|
||||||
|
|
||||||
capitalize (){
|
capitalize() {
|
||||||
|
local ARGUMENT=$1
|
||||||
local RES=""
|
local RES=""
|
||||||
local STR=""
|
local STR=""
|
||||||
local RES_NO_TRAIL_SPACE=""
|
local RES_NO_TRAIL_SPACE=""
|
||||||
local string=$1
|
|
||||||
|
|
||||||
for char in $string
|
for CHAR in $ARGUMENT
|
||||||
do
|
do
|
||||||
STR=$(echo "${char:0:1}" | tr "[:lower:]" "[:upper:]")"${char:1} "
|
STR=$(echo "${CHAR:0:1}" | tr "[:lower:]" "[:upper:]")"${CHAR:1} "
|
||||||
RES="${RES}${STR}"
|
RES="${RES}${STR}"
|
||||||
RES_NO_TRAIL_SPACE="$(echo -e "${RES}" | sed -e 's/[[:space:]]*$//')"
|
RES_NO_TRAIL_SPACE="$(echo -e "${RES}" | sed -e 's/[[:space:]]*$//')"
|
||||||
done
|
done
|
||||||
@ -182,14 +182,14 @@ capitalize (){
|
|||||||
echo "${RES_NO_TRAIL_SPACE}"
|
echo "${RES_NO_TRAIL_SPACE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function curlsource() {
|
curlsource() {
|
||||||
f=$(mktemp -t curlsource)
|
local F=$(mktemp -t curlsource)
|
||||||
curl -o "$f" -s -L "$1"
|
curl -o "$F" -s -L "$1"
|
||||||
source "$f"
|
source "$F"
|
||||||
rm -f "$f"
|
rm -f "$F"
|
||||||
}
|
}
|
||||||
|
|
||||||
set_gogh () {
|
set_gogh() {
|
||||||
string=$1
|
string=$1
|
||||||
string_r="${string%???}"
|
string_r="${string%???}"
|
||||||
string_s=${string_r//\./_}
|
string_s=${string_r//\./_}
|
||||||
@ -202,7 +202,6 @@ set_gogh () {
|
|||||||
export {PROFILE_NAME,PROFILE_SLUG}="$result" && curlsource "${url}"
|
export {PROFILE_NAME,PROFILE_SLUG}="$result" && curlsource "${url}"
|
||||||
else
|
else
|
||||||
export {PROFILE_NAME,PROFILE_SLUG}="$result" && source <(wget -O - "${url}")
|
export {PROFILE_NAME,PROFILE_SLUG}="$result" && source <(wget -O - "${url}")
|
||||||
echo "$result"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user