Don't split declaration and assignment
This commit is contained in:
parent
4200ea9613
commit
8a51cebd9a
1 changed files with 3 additions and 3 deletions
|
@ -87,10 +87,10 @@ system_update() {
|
||||||
|
|
||||||
aur_update() {
|
aur_update() {
|
||||||
local start_dir="$PWD"
|
local start_dir="$PWD"
|
||||||
local aur_packages; aur_packages=($(find ~/builds -name .git -type d -exec dirname {} \;))
|
local aur_packages=($(find ~/builds -name .git -type d -exec dirname {} \;))
|
||||||
for repo in "${aur_packages[@]}"; do
|
for repo in "${aur_packages[@]}"; do
|
||||||
cd && cd "$repo" && git fetch -q
|
cd && cd "$repo" && git fetch -q
|
||||||
local unpulled; unpulled=$(git log --pretty=format:'%h' '..@{u}' | wc -c)
|
local unpulled=$(git log --pretty=format:'%h' '..@{u}' | wc -c)
|
||||||
if [ "$unpulled" -eq 0 ]; then
|
if [ "$unpulled" -eq 0 ]; then
|
||||||
echo "$(basename "$repo") is up to date"
|
echo "$(basename "$repo") is up to date"
|
||||||
else
|
else
|
||||||
|
@ -109,7 +109,7 @@ aur_update() {
|
||||||
|
|
||||||
pull_from_repos() {
|
pull_from_repos() {
|
||||||
local start_dir="$PWD"
|
local start_dir="$PWD"
|
||||||
local git_repos; git_repos=($(find ~ -name .git -type d -not -path '*/.vim/*' -and -not -path '*/.local/*' -and -not -path '*/builds/*' -exec dirname {} \;))
|
local git_repos=($(find ~ -name .git -type d -not -path '*/.vim/*' -and -not -path '*/.local/*' -and -not -path '*/builds/*' -exec dirname {} \;))
|
||||||
for repo in "${git_repos[@]}"; do
|
for repo in "${git_repos[@]}"; do
|
||||||
echo "Pulling from $repo..."
|
echo "Pulling from $repo..."
|
||||||
cd "$repo" && git pull
|
cd "$repo" && git pull
|
||||||
|
|
Loading…
Add table
Reference in a new issue