aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <info@minifree.org>2017-09-22 00:01:52 +0000
committerGogs <gogitservice@gmail.com>2017-09-22 00:01:52 +0000
commit96b3a3f8c9dd059318f49e2ce147d966487600f4 (patch)
tree2295a42b15a595693827acb983a7bd6886dc1528
parent458f8d3621c95d02cd0335a3fff11bb94a34c14f (diff)
parentb6b87eae55b7743ccfa3d6523794767c8d9186a0 (diff)
downloadlibrebootfr-96b3a3f8c9dd059318f49e2ce147d966487600f4.tar.gz
librebootfr-96b3a3f8c9dd059318f49e2ce147d966487600f4.zip
Merge branch 'braces-braces-braces' of kragle/libreboot into master
-rwxr-xr-xlibs/common114
-rwxr-xr-xlibs/git20
-rwxr-xr-xlibs/project118
-rwxr-xr-xlibs/tool16
-rw-r--r--projects/bucts/bucts68
-rwxr-xr-xprojects/dejavu-fonts/dejavu-fonts74
-rwxr-xr-xprojects/fontconfig/fontconfig42
-rwxr-xr-xprojects/grub/grub72
-rwxr-xr-xprojects/grub/grub-helper156
-rwxr-xr-xprojects/memtest86plus/memtest86plus68
-rwxr-xr-xprojects/seabios/seabios80
-rwxr-xr-xtools/dependencies/dependencies18
-rwxr-xr-xtools/dependencies/dependencies-helper24
13 files changed, 435 insertions, 435 deletions
diff --git a/libs/common b/libs/common
index db72a974..b0cb5867 100755
--- a/libs/common
+++ b/libs/common
@@ -117,13 +117,13 @@ diff_patch_file() {
local source_file_path
- if ! ( grep -E '^-{3}.*/' "${patch_file_path}" >/dev/null 2>&1 ); then
- source_file_path="${repository_path}/${filename_in_diff}"
+ if ! ( grep -E '^-{3}.*/' "$patch_file_path" >/dev/null 2>&1 ); then
+ source_file_path="$repository_path/$filename_in_diff"
else
- source_file_path="${repository_path}/${filename_in_diff##*/}"
+ source_file_path="$repository_path/${filename_in_diff##*/}"
fi
- patch "${source_file_path}" "${patch_file_path}"
+ patch "$source_file_path" "$patch_file_path"
}
path_wildcard_expand() {
@@ -228,29 +228,29 @@ directory_filled_check() {
archive_files_create() {
local source_path="$1"
- local directory="$(basename "${source_path}")"
- local tarfiles_path="${source_path}/${DOTTARFILES}"
- local revision_path="${source_path}/${DOTREVISION}"
- local version_path="${source_path}/${DOTVERSION}"
- local epoch_path="${source_path}/${DOTEPOCH}"
- local rnd_seed_path="${source_path}/${DOTRNDSEED}"
+ local directory="$(basename "$source_path")"
+ local tarfiles_path="$source_path/$DOTTARFILES"
+ local revision_path="$source_path/$DOTREVISION"
+ local version_path="$source_path/$DOTVERSION"
+ local epoch_path="$source_path/$DOTEPOCH"
+ local rnd_seed_path="$source_path/$DOTRNDSEED"
- # Files in "${tarfiles_path}" are NUL terminated.
+ # Files in "$tarfiles_path" are NUL terminated.
# `tr '\0' '\n'` for human-readable output.
- if git_check "${source_path}"; then
- git_files "${source_path}" > "${tarfiles_path}"
- printf '%s\0' "${DOTTARFILES}" >> "${tarfiles_path}"
+ if git_check "$source_path"; then
+ git_files "$source_path" > "$tarfiles_path"
+ printf '%s\0' "$DOTTARFILES" >> "$tarfiles_path"
else
- find "${source_path}" -print0 | env LC_ALL='C.UTF-8' sort -z | sed -z "1d;s,^${source_path}/\\?,,;/^${DOTTARFILES}\$/d" > "${tarfiles_path}"
+ find "$source_path" -print0 | env LC_ALL='C.UTF-8' sort -z | sed -z "1d;s,^$source_path/\\?,,;/^$DOTTARFILES\$/d" > "$tarfiles_path"
fi
- for dotfile in "${revision_path}" \
- "${version_path}" \
- "${epoch_path}" \
- "${rnd_seed_path}"
+ for dotfile in "$revision_path" \
+ "$version_path" \
+ "$epoch_path" \
+ "$rnd_seed_path"
do
- if [[ -f "${dotfile}" ]]; then
- printf '%s\0' ".${dotfile##*.}" >> "${tarfiles_path}"
+ if [[ -f "$dotfile" ]]; then
+ printf '%s\0' ".${dotfile##*.}" >> "$tarfiles_path"
fi
done
}
@@ -258,10 +258,10 @@ archive_files_create() {
archive_files_date() {
local source_path="$1"
- local epoch_path="${source_path}/${DOTEPOCH}"
+ local epoch_path="$source_path/$DOTEPOCH"
- if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
- find "${source_path}" -execdir touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" {} +
+ if [[ -n "$SOURCE_DATE_EPOCH" ]]; then
+ find "$source_path" -execdir touch --no-dereference --date="@$SOURCE_DATE_EPOCH" {} +
fi
}
@@ -270,24 +270,24 @@ archive_create() {
local source_path="$2"
local directory="$3"
- local tarfiles_path="${source_path}/${DOTTARFILES}"
- local directory_path="$(dirname "${archive_path}")"
+ local tarfiles_path="$source_path/$DOTTARFILES"
+ local directory_path="$(dirname "$archive_path")"
- mkdir -p "${directory_path}"
+ mkdir -p "$directory_path"
- if [[ -z "${directory}" ]]; then
- directory="$(basename "${source_path}")"
+ if [[ -z "$directory" ]]; then
+ directory="$(basename "$source_path")"
fi
- archive_files_create "${source_path}"
- archive_files_date "${source_path}"
+ archive_files_create "$source_path"
+ archive_files_date "$source_path"
local tar_options=(
--create
--xz
- --file="${archive_path}"
- --files-from="${tarfiles_path}"
- --transform="s,^,${directory}/,S"
+ --file="$archive_path"
+ --files-from="$tarfiles_path"
+ --transform="s,^,$directory/,S"
--no-recursion
--warning=no-filename-with-nuls
--null
@@ -297,7 +297,7 @@ archive_create() {
)
(
- cd "${source_path}"
+ cd "$source_path"
tar "${tar_options[@]}"
)
}
@@ -306,31 +306,31 @@ archive_extract() {
local archive_path="$1"
local destination_path="$2"
- if [[ -z "${destination_path}" ]]; then
- destination_path="$(dirname "${archive_path}")"
+ if [[ -z "$destination_path" ]]; then
+ destination_path="$(dirname "$archive_path")"
fi
- tar -xf "${archive_path}" -ps -C "${destination_path}"
+ tar -xf "$archive_path" -ps -C "$destination_path"
}
rootfs_files_create() {
local source_path="$1"
- local directory="$(basename "${source_path}")"
- local tarfiles_path="${source_path}/${DOTTARFILES}"
+ local directory="$(basename "$source_path")"
+ local tarfiles_path="$source_path/$DOTTARFILES"
- # Files in "${tarfiles_path}" are NUL terminated.
+ # Files in "$tarfiles_path" are NUL terminated.
# `tr '\0' '\n'` for human-readable output.
- execute_root find "${source_path}" -print0 | env LC_ALL='C.UTF-8' sort -z | sed -z "1d;s,^${source_path}/\\?,,;/^${DOTTARFILES}\$/d" > "${tarfiles_path}"
+ execute_root find "$source_path" -print0 | env LC_ALL='C.UTF-8' sort -z | sed -z "1d;s,^$source_path/\\?,,;/^$DOTTARFILES\$/d" > "$tarfiles_path"
}
rootfs_files_date() {
local source_path="$1"
- local epoch_path="${source_path}/${DOTEPOCH}"
+ local epoch_path="$source_path/$DOTEPOCH"
- if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
- execute_root find "${source_path}" -execdir touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" {} +
+ if [[ -n "$SOURCE_DATE_EPOCH" ]]; then
+ execute_root find "$source_path" -execdir touch --no-dereference --date="@$SOURCE_DATE_EPOCH" {} +
fi
}
@@ -339,23 +339,23 @@ rootfs_create() {
local source_path="$2"
local directory="$3"
- local tarfiles_path="${source_path}/${DOTTARFILES}"
- local directory_path="$(dirname "${rootfs_path}")"
+ local tarfiles_path="$source_path/$DOTTARFILES"
+ local directory_path="$(dirname "$rootfs_path")"
- mkdir -p "${directory_path}"
+ mkdir -p "$directory_path"
- if [[ -z "${directory}" ]]; then
- directory="$(basename "${source_path}")"
+ if [[ -z "$directory" ]]; then
+ directory="$(basename "$source_path")"
fi
- rootfs_files_create "${source_path}"
- rootfs_files_date "${source_path}"
+ rootfs_files_create "$source_path"
+ rootfs_files_date "$source_path"
local tar_options=(
--create
--xz
- --file="${rootfs_path}"
- --files-from="${tarfiles_path}"
+ --file="$rootfs_path"
+ --files-from="$tarfiles_path"
--no-recursion
--warning=no-filename-with-nuls
--null
@@ -365,12 +365,12 @@ rootfs_create() {
)
(
- cd "${source_path}"
+ cd "$source_path"
execute_root tar "${tar_options[@]}"
)
- execute_root chmod 644 "${rootfs_path}"
- execute_root chown "${USER}:${USER}" "${rootfs_path}"
+ execute_root chmod 644 "$rootfs_path"
+ execute_root chown "$USER:$USER" "$rootfs_path"
}
requirements() {
diff --git a/libs/git b/libs/git
index 550c5d60..decdfe01 100755
--- a/libs/git
+++ b/libs/git
@@ -205,7 +205,7 @@ git_files() {
local repository_path="$1"
(
- cd "${repository_path}"
+ cd "$repository_path"
# Reproducible sorting.
git ls-files -z | env LC_ALL='C.UTF-8' sort -z
)
@@ -231,23 +231,23 @@ git_project_patch_recursive() {
local branch="$3"
local path="${4:-.}"
- local repository_path="$(git_project_repository_path "${repository}")"
- local project_path="$(project_path "${project}")"
- local patches_path="${project_path}/${PATCHES}/${path}"
+ local repository_path="$(git_project_repository_path "$repository")"
+ local project_path="$(project_path "$project")"
+ local patches_path="$project_path/$PATCHES/$path"
- if ! [[ -d "${patches_path}" ]]; then
+ if ! [[ -d "$patches_path" ]]; then
return
fi
- if [[ "${path}" != "." ]]; then
- git_project_patch_recursive "${project}" "${repository}" "${branch}" "$(dirname "${path}")"
+ if [[ "$path" != "." ]]; then
+ git_project_patch_recursive "$project" "$repository" "$branch" "$(dirname "$path")"
fi
- for patch in "${patches_path}"/[!.]*.@(patch|diff); do
+ for patch in "$patches_path"/[!.]*.@(patch|diff); do
if [[ "${patch##*.}" == "patch" ]]; then
- git_patch "${repository_path}" "${branch}" "${patch}"
+ git_patch "$repository_path" "$branch" "$patch"
else
- diff_patch_file "${repository_path}" "${patch}"
+ diff_patch_file "$repository_path" "$patch"
fi
done
}
diff --git a/libs/project b/libs/project
index ab56feba..37a5973c 100755
--- a/libs/project
+++ b/libs/project
@@ -48,9 +48,9 @@ project_helper_include() {
project_check() {
local project="${1##*/}"
- local project_path="$(project_path "${project}")"
+ local project_path="$(project_path "$project")"
- if ! [[ -f "${project_path}/${project}" ]]; then
+ if ! [[ -f "$project_path/$project" ]]; then
return 1
fi
}
@@ -79,14 +79,14 @@ project_action() {
(
set +e
- project_action_check "${action}" "${project}" "$@"
+ project_action_check "$action" "$project" "$@"
- printf '%s\n' "Project ${project} ${action} (with ${arguments:-no argument})" >&2
+ printf '%s\n' "Project $project $action (with ${arguments:-no argument})" >&2
- if "${action}" "$@"; then
- printf '\n%s\n' "Project ${project} ${action} (with ${arguments:-no argument}) completed" >&2
+ if "$action" "$@"; then
+ printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed" >&2
else
- printf '\n%s\n' "Project ${project} ${action} (with ${arguments:-no argument}) failed" >&2
+ printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed" >&2
return 1
fi
)
@@ -105,8 +105,8 @@ project_action_check() {
return 1
fi
- for project_force in ${PROJECTS_FORCE}; do
- if [[ "${project_force}" == "${project}" ]]; then
+ for project_force in $PROJECTS_FORCE; do
+ if [[ "$project_force" == "$project" ]]; then
return 1
fi
done
@@ -124,11 +124,11 @@ project_action_helper() {
local project="$1"
shift
- if ! function_check "${helper}"; then
+ if ! function_check "$helper"; then
return 0
fi
- "${helper}" "$@"
+ "$helper" "$@"
}
project_action_arguments() {
@@ -137,10 +137,10 @@ project_action_arguments() {
local project="$1"
shift
- project_include "${project}"
+ project_include "$project"
- project_action_arguments_verify_recursive "${action}" "${project}" "$@"
- project_action_arguments_recursive "${action}" "${project}" "$@"
+ project_action_arguments_verify_recursive "$action" "$project" "$@"
+ project_action_arguments_recursive "$action" "$project" "$@"
}
project_action_arguments_verify_recursive() {
@@ -165,18 +165,18 @@ project_action_arguments_verify_recursive() {
return 0
fi
- action_helper_arguments="$(project_action_helper 'arguments' "${project}" "$@")"
+ action_helper_arguments="$(project_action_helper 'arguments' "$project" "$@")"
- if [[ -n "${action_helper_arguments}" ]]; then
- test="$(printf '%s\n' "${action_helper_arguments}" | grep -e "^${argument}\$" || true)"
+ if [[ -n "$action_helper_arguments" ]]; then
+ test="$(printf '%s\n' "$action_helper_arguments" | grep -e "^$argument\$" || true)"
- if [[ -z "${test}" ]]; then
- printf '%s\n' "Invalid argument ${argument} for project ${project} action ${action}" >&2
+ if [[ -z "$test" ]]; then
+ printf '%s\n' "Invalid argument $argument for project $project action $action" >&2
return 1
fi
fi
- project_action_arguments_verify_recursive "${action}" "${project}" "$@"
+ project_action_arguments_verify_recursive "$action" "$project" "$@"
}
project_action_arguments_recursive() {
@@ -188,21 +188,21 @@ project_action_arguments_recursive() {
local action_helper_arguments
local argument
- action_helper_arguments="$(project_action_helper 'arguments' "${project}" "$@" || true)"
+ action_helper_arguments="$(project_action_helper 'arguments' "$project" "$@" || true)"
- if [[ -z "${action_helper_arguments}" ]]; then
- project_action "${action}" "${project}" "$@"
+ if [[ -z "$action_helper_arguments" ]]; then
+ project_action "$action" "$project" "$@"
else
# This is to allow space characters in arguments.
- local ifs_save="${IFS}"
+ local ifs_save="$IFS"
local IFS=$'\n'
- for argument in $(printf '%s\n' "${action_helper_arguments}")
+ for argument in $(printf '%s\n' "$action_helper_arguments")
do
- IFS="${ifs_save}"
+ IFS="$ifs_save"
# Only a single argument at a time is returned by the helper.
- project_action_arguments_recursive "${action}" "${project}" "$@" "${argument}"
+ project_action_arguments_recursive "$action" "$project" "$@" "$argument"
done
fi
}
@@ -213,22 +213,22 @@ project_action_projects() {
local project="$1"
shift
- local project_path="$(project_path "${project}")"
- local project_projects_path="${project_path}/${CONFIGS}/${PROJECTS}"
- local project_projects_action_path="${project_path}/${CONFIGS}/${PROJECTS}-${action}"
+ local project_path="$(project_path "$project")"
+ local project_projects_path="$project_path/$CONFIGS/$PROJECTS"
+ local project_projects_action_path="$project_path/$CONFIGS/$PROJECTS-$action"
local arguments
local path
- if [[ -f "${project_projects_action_path}" ]]; then
- path="${project_projects_action_path}"
+ if [[ -f "$project_projects_action_path" ]]; then
+ path="$project_projects_action_path"
else
- path="${project_projects_path}"
+ path="$project_projects_path"
fi
# Multiple arguments can be read from the file.
while read -r arguments; do
- eval "project_action_arguments ${action} ${arguments}"
- done < "${path}"
+ eval "project_action_arguments $action $arguments"
+ done < "$path"
}
project_path() {
@@ -448,18 +448,18 @@ project_sources_prepare() {
# Not implemented yet / May end up not being needed
#project_sources_prepare_blobs
- project_sources_prepare_patch "${project}" "${sources_path}" "$@"
+ project_sources_prepare_patch "$project" "$sources_path" "$@"
}
project_sources_prepare_patch() {
local project="$1"
local sources_path="$2"
- local project_path="$(project_path "${project}")"
- local patches_path="${project_path}/${PATCHES}"
+ local project_path="$(project_path "$project")"
+ local patches_path="$project_path/$PATCHES"
- for patch in "${patches_path}"/[!.]*.@(patch|diff); do
- diff_patch_file "${sources_path}" "${patch}"
+ for patch in "$patches_path"/[!.]*.@(patch|diff); do
+ diff_patch_file "$sources_path" "$patch"
done
}
@@ -556,8 +556,8 @@ project_usage_actions() {
(
for action in "${PROJECT_ACTIONS_GENERIC[@]}"; do
- if function_check "${action}"; then
- printf '%s\n' " ${action}"
+ if function_check "$action"; then
+ printf '%s\n' " $action"
fi
done
)
@@ -567,7 +567,7 @@ project_usage_actions() {
(
for action in "$@"; do
- printf '%s\n' " ${action}"
+ printf '%s\n' " $action"
done
)
fi
@@ -579,7 +579,7 @@ project_usage_arguments() {
printf '\n%s\n' 'Arguments:'
- project_usage_arguments_recursive "${project}" ' ' "$@"
+ project_usage_arguments_recursive "$project" ' ' "$@"
}
project_usage_arguments_recursive() {
@@ -591,12 +591,12 @@ project_usage_arguments_recursive() {
local action_helper_arguments
local argument
- action_helper_arguments="$(project_action_helper 'arguments' "${project}" "$@")"
+ action_helper_arguments="$(project_action_helper 'arguments' "$project" "$@")"
- if [[ -n "${action_helper_arguments}" ]]; then
- for argument in ${action_helper_arguments}; do
- printf '%s\n' "${spacing}${argument}"
- project_usage_arguments_recursive "${project}" " ${spacing}" "$@" "${argument}"
+ if [[ -n "$action_helper_arguments" ]]; then
+ for argument in $action_helper_arguments; do
+ printf '%s\n' "$spacing$argument"
+ project_usage_arguments_recursive "$project" " $spacing" "$@" "$argument"
done
fi
}
@@ -643,25 +643,25 @@ project_download_archive() {
local archive="${archive_uri##*/}"
local compress_fmt="${archive##*.tar}"
- local directory_prefix="${root}/${SOURCES}"
- local archive_path="${root}/${SOURCES}/${archive}"
- local sources_path="${root}/${SOURCES}/${project}"
+ local directory_prefix="$root/$SOURCES"
+ local archive_path="$root/$SOURCES/$archive"
+ local sources_path="$root/$SOURCES/$project"
if [[ "${compress_fmt#*.}" != "${ARCHIVE#*.}" ]]; then
- ARCHIVE="tar${compress_fmt}"
+ ARCHIVE="tar$compress_fmt"
fi
# TODO: Split this code block into separate functions
# Archive verification will be included at that point in time
- if ! project_sources_directory_filled_check "${project}"; then
- download_wrapper "${directory_prefix}" "${archive_uri}" "${archive_dsig_uri}"
- archive_extract "${archive_path}" "${directory_prefix}"
+ if ! project_sources_directory_filled_check "$project"; then
+ download_wrapper "$directory_prefix" "$archive_uri" "$archive_dsig_uri"
+ archive_extract "$archive_path" "$directory_prefix"
- mv "${archive_path%.tar*}" "${sources_path}"
+ mv "${archive_path%.tar*}" "$sources_path"
fi
# Patch the source, if necessary
- project_sources_prepare "${project}" "${sources_path}"
+ project_sources_prepare "$project" "$sources_path"
}
project_download_check_archive() {
@@ -669,7 +669,7 @@ project_download_check_archive() {
local sources_path="$2"
# TODO: Write the following function
- #project_sources_archive_extract_check "${project}" "${sources_path}"
+ #project_sources_archive_extract_check "$project" "$sources_path"
}
project_extract() {
diff --git a/libs/tool b/libs/tool
index 8fa154ef..8ed70e18 100755
--- a/libs/tool
+++ b/libs/tool
@@ -46,9 +46,9 @@ tool_helper_include() {
tool_check() {
local tool="${1##*/}"
- local tool_path="$(tool_path "${tool}")"
+ local tool_path="$(tool_path "$tool")"
- if ! [[ -f "${tool_path}/${tool}" ]]; then
+ if ! [[ -f "$tool_path/$tool" ]]; then
return 1
fi
}
@@ -204,18 +204,18 @@ tool_arguments_targets() {
local tool="$1"
shift
- local tool_path="$(tool_path "${tool}")"
- local targets_path="${tool_path}/${CONFIGS}"
+ local tool_path="$(tool_path "$tool")"
+ local targets_path="$tool_path/$CONFIGS"
local argument
for argument in "$@"; do
- targets_path="${targets_path}/${argument}"
+ targets_path="$targets_path/$argument"
done
- targets_path="${targets_path}/${TARGETS}"
+ targets_path="$targets_path/$TARGETS"
- if [[ -f "${targets_path}" ]]; then
- cat "${targets_path}"
+ if [[ -f "$targets_path" ]]; then
+ cat "$targets_path"
fi
}
diff --git a/projects/bucts/bucts b/projects/bucts/bucts
index 02766f8e..a5feeabc 100644
--- a/projects/bucts/bucts
+++ b/projects/bucts/bucts
@@ -16,95 +16,95 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- project_arguments_targets "${project}" "$@"
+ project_arguments_targets "$project" "$@"
}
usage() {
- project_usage_actions "${project}"
- project_usage_arguments "${project}" "$@"
+ project_usage_actions "$project"
+ project_usage_arguments "$project" "$@"
}
download() {
- local repository="${project}"
+ local repository="$project"
- project_download_git "${project}" "${repository}" 'git://git.stuge.se/bucts.git' "$@"
+ project_download_git "$project" "$repository" 'git://git.stuge.se/bucts.git' "$@"
}
download_check() {
- local repository="${project}"
+ local repository="$project"
- project_download_check_git "${project}" "${repository}" "$@"
+ project_download_check_git "$project" "$repository" "$@"
}
extract() {
- local repository="${project}"
+ local repository="$project"
- project_extract "${project}" "$@"
+ project_extract "$project" "$@"
}
extract_check() {
- local repository="${project}"
+ local repository="$project"
- project_extract_check "${project}" "$@"
+ project_extract_check "$project" "$@"
}
update() {
- local repository="${project}"
+ local repository="$project"
- project_update_git "${project}" "${repository}" "$@"
+ project_update_git "$project" "$repository" "$@"
}
update_check() {
- local repository="${project}"
+ local repository="$project"
- project_update_check_git "${project}" "${repository}" "$@"
+ project_update_check_git "$project" "$repository" "$@"
}
build() {
- local repository="${project}"
+ local repository="$project"
- project_sources_directory_missing_empty_error "${project}" "${repository}" "$@"
+ project_sources_directory_missing_empty_error "$project" "$repository" "$@"
- if git_project_check "${repository}"; then
- git_project_checkout "${project}" "${repository}" "$@"
+ if git_project_check "$repository"; then
+ git_project_checkout "$project" "$repository" "$@"
fi
- local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
- local build_path="$(project_build_path "${project}" "$@")"
+ local build_path="$(project_build_path "$project" "$@")"
- mkdir -p "${build_path}"
- make -C "${sources_path}" -j"${TASKS}"
- cp "${sources_path}/bucts" "${build_path}"
- make -C "${sources_path}" 'clean'
+ mkdir -p "$build_path"
+ make -C "$sources_path" -j"$TASKS"
+ cp "$sources_path/bucts" "$build_path"
+ make -C "$sources_path" 'clean'
}
build_check() {
- project_build_check "${project}" "$@"
+ project_build_check "$project" "$@"
}
install() {
- project_install "${project}" "$@"
+ project_install "$project" "$@"
}
install_check() {
- project_install_check "${project}" "$@"
+ project_install_check "$project" "$@"
}
release() {
- local repository="${project}"
+ local repository="$project"
- project_release_install_archive "${project}" "${TOOLS}" "$@"
- project_release_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive "$project" "$TOOLS" "$@"
+ project_release_sources_git "$project" "$repository" "$@"
}
release_check() {
local repository="bucts"
- project_release_install_archive_check "${project}" "${TOOLS}" "$@"
- project_release_check_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive_check "$project" "$TOOLS" "$@"
+ project_release_check_sources_git "$project" "$repository" "$@"
}
clean() {
- project_clean "${project}" "$@"
+ project_clean "$project" "$@"
}
diff --git a/projects/dejavu-fonts/dejavu-fonts b/projects/dejavu-fonts/dejavu-fonts
index 7768f1e1..037aa3d9 100755
--- a/projects/dejavu-fonts/dejavu-fonts
+++ b/projects/dejavu-fonts/dejavu-fonts
@@ -16,105 +16,105 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- project_arguments_targets "${project}" "$@"
+ project_arguments_targets "$project" "$@"
}
usage() {
- project_usage_actions "${project}"
- project_usage_arguments "${project}" "$@"
+ project_usage_actions "$project"
+ project_usage_arguments "$project" "$@"
}
download() {
- local repository="${project}"
+ local repository="$project"
- project_download_git "${project}" \
- "${repository}" \
+ project_download_git "$project" \
+ "$repository" \
'https://github.com/dejavu-fonts/dejavu-fonts.git' \
"$@"
- local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
- download_wrapper "${sources_path}/resources" \
+ download_wrapper "$sources_path/resources" \
'https://www.unicode.org/Public/UNIDATA/UnicodeData.txt' \
'https://www.unicode.org/Public/UNIDATA/Blocks.txt'
}
download_check() {
- local repository="${project}"
+ local repository="$project"
- project_download_check_git "${project}" "${repository}" "$@"
+ project_download_check_git "$project" "$repository" "$@"
}
extract() {
- local repository="${project}"
+ local repository="$project"
- project_extract "${project}" "$@"
+ project_extract "$project" "$@"
}
extract_check() {
- local repository="${project}"
+ local repository="$project"
- project_extract_check "${project}" "$@"
+ project_extract_check "$project" "$@"
}
update() {
- local repository="${project}"
+ local repository="$project"
- project_update_git "${project}" "${repository}" "$@"
+ project_update_git "$project" "$repository" "$@"
}
update_check() {
- local repository="${project}"
+ local repository="$project"
- project_update_check_git "${project}" "${repository}" "$@"
+ project_update_check_git "$project" "$repository" "$@"
}
build() {
- local repository="${project}"
+ local repository="$project"
- project_sources_directory_missing_empty_error "${project}" "${repository}" "$@"
+ project_sources_directory_missing_empty_error "$project" "$repository" "$@"
- if git_project_check "${repository}"; then
- git_project_checkout "${project}" "${repository}" "$@"
+ if git_project_check "$repository"; then
+ git_project_checkout "$project" "$repository" "$@"
fi
- local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
- local build_path="$(project_build_path "${project}" "$@")"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
+ local build_path="$(project_build_path "$project" "$@")"
- mkdir -p "${build_path}"
+ mkdir -p "$build_path"
# Create a symlink to the orthography files provided by fontconfig
- ln -s "${root}/${SOURCES}/fontconfig/fc-lang" "${sources_path}/resources/fc-lang"
+ ln -s "$root/$SOURCES/fontconfig/fc-lang" "$sources_path/resources/fc-lang"
- make -C "${sources_path}" -j"${TASKS}"
- cp "${sources_path}/build"/[!.]*.ttf "${build_path}"
- make -C "${sources_path}" clean
+ make -C "$sources_path" -j"$TASKS"
+ cp "$sources_path/build"/[!.]*.ttf "$build_path"
+ make -C "$sources_path" clean
}
build_check() {
- project_build_check "${project}" "$@"
+ project_build_check "$project" "$@"
}
install() {
- project_install "${project}" "$@"
+ project_install "$project" "$@"
}
install_check() {
- project_install_check "${project}" "$@"
+ project_install_check "$project" "$@"
}
release() {
- local repository="${project}"
+ local repository="$project"
- project_release_sources_git "${project}" "${repository}" "$@"
+ project_release_sources_git "$project" "$repository" "$@"
}
release_check() {
- local repository="${project}"
+ local repository="$project"
- project_release_check_sources_git "${project}" "${repository}" "$@"
+ project_release_check_sources_git "$project" "$repository" "$@"
}
clean() {
- project_clean "${project}" "$@"
+ project_clean "$project" "$@"
}
diff --git a/projects/fontconfig/fontconfig b/projects/fontconfig/fontconfig
index 42e94968..48de22f2 100755
--- a/projects/fontconfig/fontconfig
+++ b/projects/fontconfig/fontconfig
@@ -16,65 +16,65 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- project_arguments_targets "${project}" "$@"
+ project_arguments_targets "$project" "$@"
}
usage() {
- project_usage_actions "${project}"
- project_usage_arguments "${project}" "$@"
+ project_usage_actions "$project"
+ project_usage_arguments "$project" "$@"
}
download() {
- local repository="${project}"
+ local repository="$project"
- project_download_git "${project}" \
- "${repository}" \
+ project_download_git "$project" \
+ "$repository" \
'https://anongit.freedesktop.org/git/fontconfig' \
"$@"
}
download_check() {
- local repository="${project}"
+ local repository="$project"
- project_download_check_git "${project}" "${repository}" "$@"
+ project_download_check_git "$project" "$repository" "$@"
}
extract() {
- local repository="${project}"
+ local repository="$project"
- project_extract "${project}" "$@"
+ project_extract "$project" "$@"
}
extract_check() {
- local repository="${project}"
+ local repository="$project"
- project_extract_check "${project}" "$@"
+ project_extract_check "$project" "$@"
}
update() {
- local repository="${project}"
+ local repository="$project"
- project_update_git "${project}" "${repository}" "$@"
+ project_update_git "$project" "$repository" "$@"
}
update_check() {
- local repository="${project}"
+ local repository="$project"
- project_update_check_git "${project}" "${repository}" "$@"
+ project_update_check_git "$project" "$repository" "$@"
}
release() {
- local repository="${project}"
+ local repository="$project"
- project_release_sources_git "${project}" "${repository}" "$@"
+ project_release_sources_git "$project" "$repository" "$@"
}
release_check() {
- local repository="${project}"
+ local repository="$project"
- project_release_check_sources_git "${project}" "${repository}" "$@"
+ project_release_check_sources_git "$project" "$repository" "$@"
}
clean() {
- project_clean "${project}" "$@"
+ project_clean "$project" "$@"
}
diff --git a/projects/grub/grub b/projects/grub/grub
index c444841b..4962da4f 100755
--- a/projects/grub/grub
+++ b/projects/grub/grub
@@ -16,108 +16,108 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- project_arguments_targets "${project}" "$@"
+ project_arguments_targets "$project" "$@"
}
usage() {
- project_usage_actions "${project}"
- project_usage_arguments "${project}" "$@"
+ project_usage_actions "$project"
+ project_usage_arguments "$project" "$@"
}
download() {
- local repository="${project}"
+ local repository="$project"
- project_download_git "${project}" "${repository}" 'https://git.savannah.gnu.org/r/grub.git' "$@"
+ project_download_git "$project" "$repository" 'https://git.savannah.gnu.org/r/grub.git' "$@"
}
download_check() {
- local repository="${project}"
+ local repository="$project"
- project_download_check_git "${project}" "${repository}" "$@"
+ project_download_check_git "$project" "$repository" "$@"
}
extract() {
- project_extract "${project}" "$@"
+ project_extract "$project" "$@"
}
extract_check() {
- project_extract_check "${project}" "$@"
+ project_extract_check "$project" "$@"
}
update() {
- local repository="${project}"
+ local repository="$project"
- project_update_git "${project}" "${repository}" "$@"
+ project_update_git "$project" "$repository" "$@"
}
update_check() {
- local repository="${project}"
+ local repository="$project"
- project_update_check_git "${project}" "${repository}" "$@"
+ project_update_check_git "$project" "$repository" "$@"
}
build() {
local target="$1"
- local repository="${project}"
+ local repository="$project"
- project_sources_directory_missing_empty_error "${project}" "${repository}" "$@"
+ project_sources_directory_missing_empty_error "$project" "$repository" "$@"
- if git_project_check "${repository}"; then
- git_project_checkout "${project}" "${repository}" "$@"
+ if git_project_check "$repository"; then
+ git_project_checkout "$project" "$repository" "$@"
fi
- local project_path="$(project_path "${project}")"
- local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
- local build_path="$(project_build_path "${project}" "$@")"
- local raw_keymap_path="${project_path}/${CONFIGS}/keymaps"
+ local project_path="$(project_path "$project")"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
+ local build_path="$(project_build_path "$project" "$@")"
+ local raw_keymap_path="$project_path/$CONFIGS/keymaps"
- mkdir -p "${build_path}"
+ mkdir -p "$build_path"
grub_build_utils
- if [[ "${target}" == 'bios' ]]; then
+ if [[ "$target" == 'bios' ]]; then
grub_build_floppy_image
else
grub_build_standalone_image
fi
- for raw_keymap in "${raw_keymap_path}"/*; do
- grub_build_layout "${raw_keymap}"
+ for raw_keymap in "$raw_keymap_path"/*; do
+ grub_build_layout "$raw_keymap"
done
grub_build_font
grub_copy_modules
- make -C "${sources_path}" distclean
+ make -C "$sources_path" distclean
}
build_check() {
- project_build_check "${project}" "$@"
+ project_build_check "$project" "$@"
}
install() {
- project_install "${project}" "$@"
+ project_install "$project" "$@"
}
install_check() {
- project_install_check "${project}" "$@"
+ project_install_check "$project" "$@"
}
release() {
- local repository="${project}"
+ local repository="$project"
- project_release_install_archive "${project}" "${IMAGES}" "$@"
- project_release_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive "$project" "$IMAGES" "$@"
+ project_release_sources_git "$project" "$repository" "$@"
}
release_check() {
- local repository="${project}"
+ local repository="$project"
- project_release_install_archive_check "${project}" "${IMAGES}" "$@"
- project_release_check_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive_check "$project" "$IMAGES" "$@"
+ project_release_check_sources_git "$project" "$repository" "$@"
}
clean() {
- project_clean "${project}" "$@"
+ project_clean "$project" "$@"
}
diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper
index 604d4a54..dd069290 100755
--- a/projects/grub/grub-helper
+++ b/projects/grub/grub-helper
@@ -27,130 +27,130 @@ PREFIX='prefix'
SIZE='size'
grub_arch() {
- project_file_contents "${project}" "${CONFIGS}" "${ARCH}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$ARCH" "$@"
}
grub_font_file() {
- project_file_contents "${project}" "${CONFIGS}" "${FONT_FILE}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$FONT_FILE" "$@"
}
grub_font_project() {
- project_file_contents "${project}" "${CONFIGS}" "${FONT_PROJECT}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$FONT_PROJECT" "$@"
}
grub_format() {
- project_file_contents "${project}" "${CONFIGS}" "${FORMAT}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$FORMAT" "$@"
}
grub_platform() {
- project_file_contents "${project}" "${CONFIGS}" "${PLATFORM}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$PLATFORM" "$@"
}
grub_prefix() {
- project_file_contents "${project}" "${CONFIGS}" "${PREFIX}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$PREFIX" "$@"
}
grub_size() {
- project_file_contents "${project}" "${CONFIGS}" "${SIZE}" "$@"
+ project_file_contents "$project" "$CONFIGS" "$SIZE" "$@"
}
grub_config_path() {
- project_file_path "${project}" "${CONFIGS}" "${CONFIG}" "$@"
+ project_file_path "$project" "$CONFIGS" "$CONFIG" "$@"
}
grub_modmin_path() {
- project_file_path "${project}" "${CONFIGS}" "${MODMIN}" "$@"
+ project_file_path "$project" "$CONFIGS" "$MODMIN" "$@"
}
grub_copy_modules() {
- local grub_module_dir="${sources_path}/grub-core"
- local keep_dir="${build_path}/$(grub_format "${target}" "$@")"
+ local grub_module_dir="$sources_path/grub-core"
+ local keep_dir="$build_path/$(grub_format "$target" "$@")"
- mkdir -p "${keep_dir}"
+ mkdir -p "$keep_dir"
- cp -a "${grub_module_dir}"/*.@(mod|lst) "${keep_dir}"
+ cp -a "$grub_module_dir"/*.@(mod|lst) "$keep_dir"
}
grub_build_font() {
# Font project-specific filenames and paths
- local font_file="$(grub_font_file "${FONTS}" "$@")"
- local font_project="$(grub_font_project "${FONTS}" "$@")"
- local font_build_dir="${root}/${BUILD}/${font_project}"
+ local font_file="$(grub_font_file "$FONTS" "$@")"
+ local font_project="$(grub_font_project "$FONTS" "$@")"
+ local font_build_dir="$root/$BUILD/$font_project"
- local grub_mkfont="${sources_path}/grub-mkfont"
+ local grub_mkfont="$sources_path/grub-mkfont"
# GRUB font directory for outputting the built PF2 file
- mkdir -p "${build_path}/${FONTS}"
+ mkdir -p "$build_path/$FONTS"
- "${grub_mkfont}" --output="${build_path}/${FONTS}/${font_file%.*}.pf2" \
- "${font_build_dir}/${font_file}"
+ "$grub_mkfont" --output="$build_path/$FONTS/${font_file%.*}.pf2" \
+ "$font_build_dir/$font_file"
}
grub_build_utils() {
(
# If arch and/or platform files don't exist,
# the configure script will pick a reasonable default
- local arch="$(grub_arch "${target}" "$@")"
- local platform="$(grub_platform "${target}" "$@")"
+ local arch="$(grub_arch "$target" "$@")"
+ local platform="$(grub_platform "$target" "$@")"
- cd "${sources_path}" || return
+ cd "$sources_path" || return
- if git_project_check "${repository}"; then
+ if git_project_check "$repository"; then
./autogen.sh
fi
- ./configure --target="${arch}" --with-platform="${platform}"
+ ./configure --target="$arch" --with-platform="$platform"
- make -j"${TASKS}"
+ make -j"$TASKS"
)
}
grub_build_layout() {
local raw_layout="${1##*/}"
local raw_layout_path="$1"
- local keymap_out_path="${build_path}/keymaps"
- local grub_mklayout="${sources_path}/grub-mklayout"
- local grub_kbd_layout="${keymap_out_path}/${raw_layout}.gkb"
+ local keymap_out_path="$build_path/keymaps"
+ local grub_mklayout="$sources_path/grub-mklayout"
+ local grub_kbd_layout="$keymap_out_path/$raw_layout.gkb"
- if ! [[ -e "${keymap_out_path}" ]]; then
- mkdir -p "${keymap_out_path}"
- elif ! [[ -d "${keymap_out_path}" ]]; then
- printf '\n%s\n' "Error: File ${keymap_out_path} is not a directory" 1>&2
+ if ! [[ -e "$keymap_out_path" ]]; then
+ mkdir -p "$keymap_out_path"
+ elif ! [[ -d "$keymap_out_path" ]]; then
+ printf '\n%s\n' "Error: File $keymap_out_path is not a directory" 1>&2
return 1
fi
- "${grub_mklayout}" --output="${grub_kbd_layout}" --input="${raw_layout_path}"
+ "$grub_mklayout" --output="$grub_kbd_layout" --input="$raw_layout_path"
}
grub_build_bootable_image() {
- local arch="$(grub_arch "${target}" "$@")"
- local format="$(grub_format "${target}" "$@")"
- local prefix="$(grub_prefix "${target}" "$@")"
- local config_path="$(grub_config_path "${target}" "$@")"
-
- local grub_mkimage="${sources_path}/grub-mkimage"
- local grub_module_dir="${sources_path}/grub-core"
-
- local grubimg="${build_path}/grub.img"
- local grub_bootimg="${grub_module_dir}/boot.img"
- local grub_bootable_img="${build_path}/grub2"
-
- "${grub_mkimage}" \
- --config="${config_path}" \
- --directory="${grub_module_dir}" \
- --output="${grubimg}" \
- --format="${format}" \
- --prefix="${prefix}" \
+ local arch="$(grub_arch "$target" "$@")"
+ local format="$(grub_format "$target" "$@")"
+ local prefix="$(grub_prefix "$target" "$@")"
+ local config_path="$(grub_config_path "$target" "$@")"
+
+ local grub_mkimage="$sources_path/grub-mkimage"
+ local grub_module_dir="$sources_path/grub-core"
+
+ local grubimg="$build_path/grub.img"
+ local grub_bootimg="$grub_module_dir/boot.img"
+ local grub_bootable_img="$build_path/grub2"
+
+ "$grub_mkimage" \
+ --config="$config_path" \
+ --directory="$grub_module_dir" \
+ --output="$grubimg" \
+ --format="$format" \
+ --prefix="$prefix" \
cbfs configfile
- cat "${grub_bootimg}" "${grubimg}" > "${grub_bootable_img}"
- rm -f "${grubimg}"
+ cat "$grub_bootimg" "$grubimg" > "$grub_bootable_img"
+ rm -f "$grubimg"
}
grub_build_floppy_image() {
- local grubimg="${build_path}/grub2"
- local tempfile="${build_path}/temp.file"
+ local grubimg="$build_path/grub2"
+ local tempfile="$build_path/temp.file"
if ! grub_build_bootable_image "$@"; then
printf '\n%s\n\n' "Error: Failed to build a GRUB image" 1>&2
@@ -158,27 +158,27 @@ grub_build_floppy_image() {
return 1
fi
- local size="$(grub_size "${target}" "$@")"
+ local size="$(grub_size "$target" "$@")"
# Pre-allocate a floppy-sized image
# SeaBIOS requires floppy images to have a "correct" size
- if ! [[ -e "${tempfile}" ]]; then
- dd if=/dev/zero of="${tempfile}" bs=1024 count="${size:-160}"
+ if ! [[ -e "$tempfile" ]]; then
+ dd if=/dev/zero of="$tempfile" bs=1024 count="${size:-160}"
else
- printf '\n%s\n\n' "Error: File ${tempfile} already exists!" 1>&2
+ printf '\n%s\n\n' "Error: File $tempfile already exists!" 1>&2
return 1
fi
- local -i grubimg_size="$(stat -c %s "${grubimg}")"
+ local -i grubimg_size="$(stat -c %s "$grubimg")"
local -i floppy_size="$((${size:-160} * 1024))"
# Graft the GRUB image onto the blank floppy image
if ((grubimg_size <= floppy_size)); then
- dd if="${grubimg}" of="${tempfile}" bs=1 conv=notrunc
+ dd if="$grubimg" of="$tempfile" bs=1 conv=notrunc
- rm -f "${grubimg}"
- mv "${tempfile}" "${grubimg}"
+ rm -f "$grubimg"
+ mv "$tempfile" "$grubimg"
else
printf '\n%s' "Error: Image ${grubimg##*/} is too large; " 1>&2
printf '%s\n\n' "it must be less than ${size}KiB in size" 1>&2
@@ -188,25 +188,25 @@ grub_build_floppy_image() {
}
grub_build_standalone_image() {
- local arch="$(grub_arch "${target}" "$@")"
- local format="$(grub_format "${target}" "$@")"
- local prefix="$(grub_prefix "${target}" "$@")"
- local config_path="$(grub_config_path "${target}" "$@")"
+ local arch="$(grub_arch "$target" "$@")"
+ local format="$(grub_format "$target" "$@")"
+ local prefix="$(grub_prefix "$target" "$@")"
+ local config_path="$(grub_config_path "$target" "$@")"
- local grubimg="${build_path}/grub2"
+ local grubimg="$build_path/grub2"
- local grub_mkimage="${sources_path}/grub-mkimage"
- local grub_mkstandalone="${sources_path}/grub-mkstandalone"
- local grub_module_dir="${sources_path}/grub-core"
+ local grub_mkimage="$sources_path/grub-mkimage"
+ local grub_mkstandalone="$sources_path/grub-mkstandalone"
+ local grub_module_dir="$sources_path/grub-core"
- "${grub_mkstandalone}" \
- --grub-mkimage="${grub_mkimage}" \
+ "$grub_mkstandalone" \
+ --grub-mkimage="$grub_mkimage" \
--fonts='' \
--themes='' \
--locales='' \
--install-modules='cbfs configfile' \
- --directory="${grub_module_dir}" \
- --format="${format}" \
- --output="${grubimg}" \
- /boot/grub/grub.cfg="${config_path}"
+ --directory="$grub_module_dir" \
+ --format="$format" \
+ --output="$grubimg" \
+ /boot/grub/grub.cfg="$config_path"
}
diff --git a/projects/memtest86plus/memtest86plus b/projects/memtest86plus/memtest86plus
index d443447c..1aadbf6c 100755
--- a/projects/memtest86plus/memtest86plus
+++ b/projects/memtest86plus/memtest86plus
@@ -16,95 +16,95 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- project_arguments_targets "${project}" "$@"
+ project_arguments_targets "$project" "$@"
}
usage() {
- project_usage_actions "${project}"
- project_usage_arguments "${project}" "$@"
+ project_usage_actions "$project"
+ project_usage_arguments "$project" "$@"
}
download() {
- local repository="${project}"
+ local repository="$project"
- project_download_git "${project}" "${repository}" 'https://review.coreboot.org/memtest86plus.git' "$@"
+ project_download_git "$project" "$repository" 'https://review.coreboot.org/memtest86plus.git' "$@"
}
download_check() {
- local repository="${project}"
+ local repository="$project"
- project_download_check_git "${project}" "${repository}" "$@"
+ project_download_check_git "$project" "$repository" "$@"
}
extract() {
- local repository="${project}"
+ local repository="$project"
- project_extract "${project}" "$@"
+ project_extract "$project" "$@"
}
extract_check() {
- local repository="${project}"
+ local repository="$project"
- project_extract_check "${project}" "$@"
+ project_extract_check "$project" "$@"
}
update() {
- local repository="${project}"
+ local repository="$project"
- project_update_git "${project}" "${repository}" "$@"
+ project_update_git "$project" "$repository" "$@"
}
update_check() {
- local repository="${project}"
+ local repository="$project"
- project_update_check_git "${project}" "${repository}" "$@"
+ project_update_check_git "$project" "$repository" "$@"
}
build() {
- local repository="${project}"
+ local repository="$project"
- project_sources_directory_missing_empty_error "${project}" "${repository}" "$@"
+ project_sources_directory_missing_empty_error "$project" "$repository" "$@"
- if git_project_check "${repository}"; then
- git_project_checkout "${project}" "${repository}" "$@"
+ if git_project_check "$repository"; then
+ git_project_checkout "$project" "$repository" "$@"
fi
- local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
- local build_path="$(project_build_path "${project}" "$@")"
+ local build_path="$(project_build_path "$project" "$@")"
- mkdir -p "${build_path}"
- make -C "${sources_path}" -j"${TASKS}"
- cp "${sources_path}/memtest" "${build_path}"
- make -C "${sources_path}" 'clean'
+ mkdir -p "$build_path"
+ make -C "$sources_path" -j"$TASKS"
+ cp "$sources_path/memtest" "$build_path"
+ make -C "$sources_path" 'clean'
}
build_check() {
- project_build_check "${project}" "$@"
+ project_build_check "$project" "$@"
}
install() {
- project_install "${project}" "$@"
+ project_install "$project" "$@"
}
install_check() {
- project_install_check "${project}" "$@"
+ project_install_check "$project" "$@"
}
release() {
- local repository="${project}"
+ local repository="$project"
- project_release_install_archive "${project}" "${TOOLS}" "$@"
- project_release_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive "$project" "$TOOLS" "$@"
+ project_release_sources_git "$project" "$repository" "$@"
}
release_check() {
local repository="memtest86plus"
- project_release_install_archive_check "${project}" "${TOOLS}" "$@"
- project_release_check_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive_check "$project" "$TOOLS" "$@"
+ project_release_check_sources_git "$project" "$repository" "$@"
}
clean() {
- project_clean "${project}" "$@"
+ project_clean "$project" "$@"
}
diff --git a/projects/seabios/seabios b/projects/seabios/seabios
index 6fb21bee..ce9593b0 100755
--- a/projects/seabios/seabios
+++ b/projects/seabios/seabios
@@ -16,103 +16,103 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- project_arguments_targets "${project}" "$@"
+ project_arguments_targets "$project" "$@"
}
usage() {
- project_usage_actions "${project}"
- project_usage_arguments "${project}" "$@"
+ project_usage_actions "$project"
+ project_usage_arguments "$project" "$@"
}
download() {
- local repository="${project}"
+ local repository="$project"
- project_download_git "${project}" "${repository}" 'https://review.coreboot.org/seabios.git' "$@"
+ project_download_git "$project" "$repository" 'https://review.coreboot.org/seabios.git' "$@"
}
download_check() {
- local repository="${project}"
+ local repository="$project"
- project_download_check_git "${project}" "${repository}" "$@"
+ project_download_check_git "$project" "$repository" "$@"
}
extract() {
- project_extract "${project}" "$@"
+ project_extract "$project" "$@"
}
extract_check() {
- project_extract_check "${project}" "$@"
+ project_extract_check "$project" "$@"
}
update() {
- local repository="${project}"
+ local repository="$project"
- project_update_git "${project}" "${repository}" "$@"
+ project_update_git "$project" "$repository" "$@"
}
update_check() {
- local repository="${project}"
+ local repository="$project"
- project_update_check_git "${project}" "${repository}" "$@"
+ project_update_check_git "$project" "$repository" "$@"
}
build() {
local target="$1"
- local repository="${project}"
+ local repository="$project"
- project_sources_directory_missing_empty_error "${project}" "${repository}" "$@"
+ project_sources_directory_missing_empty_error "$project" "$repository" "$@"
- if git_project_check "${repository}"; then
- git_project_checkout "${project}" "${repository}" "$@"
+ if git_project_check "$repository"; then
+ git_project_checkout "$project" "$repository" "$@"
fi
- local project_path="$(project_path "${project}")"
- local seabios_config_path="$(project_file_path "${project}" "${CONFIGS}" 'config' "$@")"
- local sources_path="$(project_sources_path "${project}" "${repository}" "$@")"
- local build_path="$(project_build_path "${project}" "$@")"
+ local project_path="$(project_path "$project")"
+ local seabios_config_path="$(project_file_path "$project" "$CONFIGS" 'config' "$@")"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
+ local build_path="$(project_build_path "$project" "$@")"
- mkdir -p "${build_path}"
- cp "${seabios_config_path}" "${sources_path}/.config"
+ mkdir -p "$build_path"
+ cp "$seabios_config_path" "$sources_path/.config"
- make -C "${sources_path}" -j"${TASKS}"
+ make -C "$sources_path" -j"$TASKS"
- if [[ "${target}" == 'bios' ]]; then
- cp "${sources_path}/out/bios.bin.elf" "${build_path}"
- elif [[ "${target}" == 'vgabios' ]]; then
- cp "${sources_path}/out/vgabios.bin" "${build_path}"
+ if [[ "$target" == 'bios' ]]; then
+ cp "$sources_path/out/bios.bin.elf" "$build_path"
+ elif [[ "$target" == 'vgabios' ]]; then
+ cp "$sources_path/out/vgabios.bin" "$build_path"
fi
- make -C "${sources_path}" distclean
+ make -C "$sources_path" distclean
- rm -f "${sources_path}/.config"
+ rm -f "$sources_path/.config"
}
build_check() {
- project_build_check "${project}" "$@"
+ project_build_check "$project" "$@"
}
install() {
- project_install "${project}" "$@"
+ project_install "$project" "$@"
}
install_check() {
- project_install_check "${project}" "$@"
+ project_install_check "$project" "$@"
}
release() {
- local repository="${project}"
+ local repository="$project"
- project_release_install_archive "${project}" "${IMAGES}" "$@"
- project_release_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive "$project" "$IMAGES" "$@"
+ project_release_sources_git "$project" "$repository" "$@"
}
release_check() {
- local repository="${project}"
+ local repository="$project"
- project_release_install_archive_check "${project}" "${IMAGES}" "$@"
- project_release_check_sources_git "${project}" "${repository}" "$@"
+ project_release_install_archive_check "$project" "$IMAGES" "$@"
+ project_release_check_sources_git "$project" "$repository" "$@"
}
clean() {
- project_clean "${project}" "$@"
+ project_clean "$project" "$@"
}
diff --git a/tools/dependencies/dependencies b/tools/dependencies/dependencies
index 13d56f74..cc9b2b38 100755
--- a/tools/dependencies/dependencies
+++ b/tools/dependencies/dependencies
@@ -16,35 +16,35 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
arguments() {
- tool_arguments_targets "${tool}" "$@"
+ tool_arguments_targets "$tool" "$@"
}
usage() {
- tool_usage_actions "${tool}" 'print'
- tool_usage_arguments "${tool}" "$@"
+ tool_usage_actions "$tool" 'print'
+ tool_usage_arguments "$tool" "$@"
}
print() {
local distro="$1"
local arch="$(uname -i || uname -m)"
- local tool_path="$(tool_path "${tool}")"
+ local tool_path="$(tool_path "$tool")"
- if [[ -z "${arch}" ]]; then
+ if [[ -z "$arch" ]]; then
printf '\n%s\n' 'uname(1) produced no output. Exiting' 1>&2
return 1
fi
- dependencies_host_supported "${distro}" "${arch}" || return
+ dependencies_host_supported "$distro" "$arch" || return
local -a dependencies
- for dependency_file in "${tool_path}/${CONFIGS}/${distro}/${arch}"/*; do
+ for dependency_file in "$tool_path/$CONFIGS/$distro/$arch"/*; do
if [[ "${dependency_file##*/}" != 'README' ]]; then
local -i origin="${#dependencies[@]}"
- mapfile -tO "${origin}" dependencies < "${dependency_file}"
+ mapfile -tO "$origin" dependencies < "$dependency_file"
else
continue
fi
@@ -53,5 +53,5 @@ print() {
local -a sorted
mapfile -t sorted < <(printf '%s\n' "${dependencies[@]}" | sort | uniq)
- dependencies_print "${distro}" "${sorted[@]}"
+ dependencies_print "$distro" "${sorted[@]}"
}
diff --git a/tools/dependencies/dependencies-helper b/tools/dependencies/dependencies-helper
index 36d2f3ea..9e02ad3c 100755
--- a/tools/dependencies/dependencies-helper
+++ b/tools/dependencies/dependencies-helper
@@ -19,7 +19,7 @@ dependencies_print() {
local distro="$1"
shift
- if [[ "${distro}" == 'parabola' ]]; then
+ if [[ "$distro" == 'parabola' ]]; then
printf '\n%s\n' 'Enable the multilib repository in /etc/pacman.conf'
printf '\n%s\n' 'Then, run the following command as root:'
printf '\n%s%s\n' 'pacman -S --needed ' "$*"
@@ -33,19 +33,19 @@ dependencies_host_supported() {
local distro="$1"
local arch="$2"
- dependencies_distro_supported "${distro}" || return
- dependencies_arch_supported "${distro}" "${arch}" || return
+ dependencies_distro_supported "$distro" || return
+ dependencies_arch_supported "$distro" "$arch" || return
}
dependencies_arch_supported() {
local distro="$1"
local arch="$2"
- local tool_path="$(tool_path "${tool}")"
- local distro_dir="${tool_path}/${CONFIGS}/${distro}"
+ local tool_path="$(tool_path "$tool")"
+ local distro_dir="$tool_path/$CONFIGS/$distro"
- if ! [[ -d "${distro_dir}/${arch}" ]]; then
- printf '\n%s\n' "Architecture \"${arch}\" is not supported" 1>&2
+ if ! [[ -d "$distro_dir/$arch" ]]; then
+ printf '\n%s\n' "Architecture \"$arch\" is not supported" 1>&2
return 1
fi
@@ -54,17 +54,17 @@ dependencies_arch_supported() {
dependencies_distro_supported() {
local distro="$1"
- local tool_path="$(tool_path "${tool}")"
- local targets_path="${tool_path}/${CONFIGS}/${TARGETS}"
+ local tool_path="$(tool_path "$tool")"
+ local targets_path="$tool_path/$CONFIGS/$TARGETS"
local -a targets_list
- mapfile -t targets_list < "${targets_path}"
+ mapfile -t targets_list < "$targets_path"
# Necessary to properly format the string for extglob use below
IFS='|' eval 'local distro_list="${targets_list[*]}"'
- if [[ "${distro}" != @(${distro_list}) ]]; then
- printf '\n%s' "Argument \"${distro}\" is not supported. " 1>&2
+ if [[ "$distro" != @($distro_list) ]]; then
+ printf '\n%s' "Argument \"$distro\" is not supported. " 1>&2
printf '%s\n' 'Check spelling?' 1>&2
usage