/usr/bin/ui-auto-sp2ui is in ui-auto 1.1.17-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #!/bin/bash -e
PATH="${PATH}:$(dirname $0):/usr/local/share/ui-auto:/usr/share/ui-auto"
. ui-libopt.sh
ui_opt_init "Interactively update a sp-auto enabled project to ui-auto." "\
Just run this from your project's top level (i.e., where old .sp-auto.conf is located)."
ui_opt_parse "$@"
replace()
{
local f="$1"
local s="$2"
local d="$3"
local f_tmp="$f.ui-auto-sp2ui.tmp"
cp "${f}" "${f_tmp}"
sed "s/${s}/${d}/g" "${f_tmp}" >"${f}"
rm "${f_tmp}"
}
if ! test -f .sp-auto.conf; then
echo "Not top level of an old sp-auto project: No .sp-auto.conf. Exiting." >&2
exit 1
fi
echo "Old sp-auto enabled project tree found."
read -p "RETURN to update project (changes only local files), C-c to cancel."
ui-auto-uvc check_sync
echo "Updating .sp-auto.conf to .ui-auto.conf..."
mv -v .sp-auto.conf .ui-auto.conf
for f in $(find . -type f ! -wholename "*/.svn/*" ! -wholename "*/CVS/*" ! -name "*~" ! -name "ChangeLog" ! -name "NEWS"); do
echo "Updating ${f}..."
replace "$f" "sp-auto" "ui-auto"
replace "$f" "sp_opt" "ui_opt"
replace "$f" "sp_env" "ui_env"
replace "$f" "sp_release" "ui_release"
replace "$f" "sp-libopt.sh" "ui-libopt.sh"
replace "$f" "SP_" "UI_"
replace "$f" "sp-doxygen" "ui-doxygen"
replace "$f" "sp-version" "ui-version"
replace "$f" "sp-distdir" "ui-distdir"
done
echo
echo "=> Project updated; remaining TODOS for you:"
echo
echo "* Verify all changed files via VCS. You should only see sp->ui naming conversions for ui-auto related strings."
echo "* Run \"ui-auto-strap && ./configure && make distcheck\" to test changes."
echo "* VC: Remove obsolete file .sp-auto.conf, add new file new file .ui-auto.conf."
echo "* VC: You may need to fix up 'ignore settings'."
if [ -e "${HOME}/.sp-auto.conf" -a ! -e "${HOME}/.ui-auto.conf" ]; then
echo
echo "NOTE: The following is NOT related to the project, just a convenience update for your local user configuration."
echo "I also note that you have a per-user ~/.sp-auto.conf, but no ~/.ui-auto.conf."
echo "You can just have both files in parallel as long as you need to use both, sp-auto and ui-auto."
read -p "Create a skeleton ~/.ui-auto.conf based on ~/.sp-auto.conf (y/N)?" answer
if [ "${answer}" = "y" ]; then
sed -e "s/sp_auto/ui_auto/g" -e "s/sp-auto/ui-auto/g" ${HOME}/.sp-auto.conf >${HOME}/.ui-auto.conf
echo "${HOME}/.ui-auto.conf created. This file NEEDS manual inspection, though."
fi
fi
exit 0
|