Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devel/execute_on_all_databases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi
. ./devel/all_dbs.sh || exit 2
for db in $all
do
for sql in $*
for sql in "$@"
do
echo "Execute script '$sql' on '$db' database"
./devel/db.sh psql "$db" < "$sql" || exit 2
Expand Down
2 changes: 1 addition & 1 deletion devel/execute_on_all_databases_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
. ./devel/all_dbs.sh || exit 2
for db in $all
do
for sql in $*
for sql in "$@"
do
echo "Execute script '$sql' on '$db' database"
kubectl exec -in "devstats-${kenv2}" "${member}" -- psql "$db" < "$sql"
Expand Down
2 changes: 1 addition & 1 deletion devel/mass_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ then
echo "You need to set TO, example FROM=abc TO=xyz $0 ./some_dir/*"
exit 2
fi
for f in $*
for f in "$@"
do
ls -l "$f"
# vim --not-a-term -c "%s/${FROM}/${TO}/g" -c "wq!" "$f"
Expand Down
10 changes: 5 additions & 5 deletions git-lfs-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ object() {
return
fi

Oid=$(git show $Rev:$File 2> /dev/null | grep "sha256" | cut -d ":" -f 2)
Oid=$(git show "${Rev}:${File}" 2> /dev/null | grep "sha256" | cut -d ":" -f 2)
if [ "$Oid" != "" ]; then
Oid12=$(echo $Oid | cut -b 1-2)
Oid34=$(echo $Oid | cut -b 3-4)
Oid12=$(echo "$Oid" | cut -b 1-2)
Oid34=$(echo "$Oid" | cut -b 3-4)
Object=.git/lfs/objects/$Oid12/$Oid34/$Oid
if [ ! -e "$Object" ]; then
echo "Missing file $File at revision $Rev"
Expand All @@ -34,14 +34,14 @@ object() {
}


ObjectA=$(object $RevA $File)
ObjectA=$(object "$RevA" "$File")
EC="$?"
if [ "$EC" != "0" ]; then
echo "$ObjectA"
exit "$EC"
fi

ObjectB=$(object $RevB $File)
ObjectB=$(object "$RevB" "$File")
EC="$?"
if [ "$EC" != "0" ]; then
echo "$ObjectB"
Expand Down
2 changes: 1 addition & 1 deletion util_sh/monitor_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ then
fi

# Run command, store pid as $pid
( $* ) & pid=$!
( "$@" ) & pid=$!
# Spawn watcher that waits TIMEOUT seconds and then kills command gracefully via kill -HUP, store watcher pid as $wather
( sleep $TIMEOUT && kill -HUP $pid ) 2>/dev/null & watcher=$!

Expand Down