mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fix update_lists in ppa.sh
This commit is contained in:
parent
1fd26e45c8
commit
45a631dbaf
@ -54,14 +54,17 @@ update_lists_helper() {
|
|||||||
update_lists() {
|
update_lists() {
|
||||||
local ppa=${1:-}
|
local ppa=${1:-}
|
||||||
local ppa_search=${2:-}
|
local ppa_search=${2:-}
|
||||||
if [ ! -e /tmp/setup_php ] || [[ -n $ppa && -n $ppa_search ]]; then
|
local list=
|
||||||
|
status_file=/tmp/os_lists
|
||||||
if [[ -n "$ppa" && -n "$ppa_search" ]]; then
|
if [[ -n "$ppa" && -n "$ppa_search" ]]; then
|
||||||
list="$list_dir"/"$(basename "$(grep -lr "$ppa_search" "$list_dir")")"
|
list="$list_dir"/"$(basename "$(grep -lr "$ppa_search" "$list_dir")")"
|
||||||
|
status_file=/tmp/"${ppa/\//_}"
|
||||||
elif grep -Eq '^deb ' "$list_file"; then
|
elif grep -Eq '^deb ' "$list_file"; then
|
||||||
list="$list_file"
|
list="$list_file"
|
||||||
fi
|
fi
|
||||||
|
if [ ! -e "$status_file" ]; then
|
||||||
update_lists_helper "$list" >/dev/null 2>&1
|
update_lists_helper "$list" >/dev/null 2>&1
|
||||||
echo '' | tee /tmp/setup_php >/dev/null 2>&1
|
echo '' | tee "$status_file" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user