browser-home-profile/functions: Renamed pr_ prefix to pr- (minor fix)
This commit is contained in:
parent
522c723356
commit
fffd53b57c
2 changed files with 9 additions and 9 deletions
|
@ -13,31 +13,31 @@ function bhp {
|
|||
|
||||
for dir (${HOME}/.${PROFILE} ${HOME}/.cache/${PROFILE#config/}) {
|
||||
[[ -d ${dir} ]] || continue
|
||||
pr_begin "Setting up tarball..."
|
||||
pr-begin "Setting up tarball..."
|
||||
pushd -q ${dir:h} || continue
|
||||
|
||||
if [[ -f ${profile}/.unpacked ]]; then
|
||||
if [[ -f ${profile}${ext} ]] {
|
||||
mv -f ${profile}${ext} ${profile}.old${ext} ||
|
||||
{ pr_end 1 Moving; continue; }
|
||||
{ pr-end 1 Moving; continue; }
|
||||
}
|
||||
tar -X ${profile}/.unpacked -Ocp ${profile} | \
|
||||
${=compressor} ${profile}${ext} ||
|
||||
{ pr_end 1 Packing; continue; }
|
||||
{ pr-end 1 Packing; continue; }
|
||||
else
|
||||
if [[ -f ${profile}${ext} ]]; then
|
||||
tarball=${profile}${ext}
|
||||
elif [[ -f ${profile}.old${ext} ]]; then
|
||||
tarball=${profile}.old${ext}
|
||||
else
|
||||
pr_warn "No tarball found."; continue
|
||||
pr-warn "No tarball found."; continue
|
||||
fi
|
||||
${compressor[(w)1]} -cd ${tarball} | tar -xp &&
|
||||
touch ${profile}/.unpacked ||
|
||||
{ pr_end 1 Unpacking; continue; }
|
||||
{ pr-end 1 Unpacking; continue; }
|
||||
fi
|
||||
popd -q
|
||||
pr_end ${?}
|
||||
pr-end ${?}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,12 +49,12 @@ function mktmp {
|
|||
done
|
||||
|
||||
if ! ([[ ${#} == 1 ]] && [[ -n ${1} ]]); then
|
||||
pr_error "Invalid argument(s)"
|
||||
pr-error "Invalid argument(s)"
|
||||
return 3
|
||||
fi
|
||||
case ${1} {
|
||||
(*${temp}) ;;
|
||||
(*) pr_error "Invalid TEMPLATE"; return 4;;
|
||||
(*) pr-error "Invalid TEMPLATE"; return 4;;
|
||||
}
|
||||
|
||||
if (( ${+commands[mktemp]} )); then
|
||||
|
@ -68,7 +68,7 @@ function mktmp {
|
|||
(*) [[ -e ${tmp} ]] || { mkdir -p ${tmp:h}; touch ${tmp}; };;
|
||||
}
|
||||
if (( ${?} != 0 )) {
|
||||
pr_error "Failed to create ${tmp}"
|
||||
pr-error "Failed to create ${tmp}"
|
||||
return 5
|
||||
}
|
||||
[[ -h ${tmp} ]] && return
|
||||
|
|
Loading…
Add table
Reference in a new issue