@@ -29,7 +29,7 @@ uninstall(){
2929 else
3030 sudo rm -rf /usr/local/share/doc/pyradio 2> /dev/null
3131 fi
32- sudo rm -f /usr/share/man/man1/pyradio.1.gz 2> /dev/null
32+ sudo rm -f /usr/share/man/man1/pyradio.1.gz 2> /dev/null || sudo rm -f /usr/local/share/man/man1/pyradio.1.gz 2> /dev/null
3333 echo " PyRadio successfully uninstalled"
3434}
3535
@@ -98,7 +98,7 @@ descr=$(git describe --long --tags 2>/dev/null || echo not_from_git)
9898 echo -n " s/git_description = ''/git_description = '" > sed.$$
9999 echo -n " ${descr} " >> sed.$$
100100 echo " '/" >> sed.$$
101- sed -f sed.$$ pyradio/radio.py > tmp-radio.py && mv tmp-radio.py pyradio/radio.py || {
101+ sed -f sed.$$ pyradio/radio.py > tmp-radio.py && mv -f tmp-radio.py pyradio/radio.py || {
102102 # failed... restore radio.py
103103 # and build without revision info
104104 git checkout pyradio/radio.py
@@ -112,7 +112,7 @@ python"${TO_PYTHON}" setup.py build && {
112112 echo " ***** installing..."
113113 sudo python" ${TO_PYTHON} " setup.py install && {
114114 gzip -k pyradio.1
115- sudo mv pyradio.1.gz /usr/share/man/man1
115+ sudo mv -f pyradio.1.gz /usr/share/man/man1 2> /dev/null || sudo mv -f pyradio.1.gz /usr/local /share/man/man1
116116 DOC=/usr/share/doc/pyradio
117117 sudo mkdir " $DOC " 2> /dev/null
118118 if [ ! -d " $DOC " ]; then
@@ -138,7 +138,7 @@ python"${TO_PYTHON}" setup.py build && {
138138[ -z " $descr " ] || {
139139 echo " s/git_description = '[^']*'/git_description = ''/" > sed.$$
140140 sed -f sed.$$ pyradio/radio.py > tmp-radio.py
141- mv tmp-radio.py pyradio/radio.py
141+ mv -f tmp-radio.py pyradio/radio.py
142142 # git checkout pyradio/radio.py
143143}
144144rm sed.$$ 2> /dev/null
0 commit comments