113 |
touch /.dist-upgrade |
touch /.dist-upgrade |
114 |
fi |
fi |
115 |
|
|
116 |
# check for -f option |
# only run this if X11R6 is a directory and not a symlink |
117 |
if [[ -n $(magequery -h | grep -- -f) ]] |
if [[ -d /usr/X11R6 ]] && [[ ! -L /usr/X11R6 ]] |
118 |
then |
then |
119 |
# uninstall all /usr/X11R6 packages first |
# check for -f option |
120 |
for i in $(magequery -f /usr/X11R6 | sed 's:.*/\(.*\)-.*-r.*:\1:') |
if [[ -n $(magequery -h | grep -- -f) ]] |
121 |
do |
then |
122 |
mage uninstall ${i} |
# uninstall all /usr/X11R6 packages first |
123 |
done |
for i in $(magequery -f /usr/X11R6 | sed 's:.*/\(.*\)-.*-r.*:\1:') |
124 |
|
do |
125 |
|
mage uninstall ${i} |
126 |
|
done |
127 |
|
fi |
128 |
|
|
129 |
|
# if there are any files after uninstall, simply delete them |
130 |
|
[ -d /usr/X11R6 ] && rm -rf /usr/X11R6 |
131 |
fi |
fi |
|
# if /usr/X11R6 is a directoy, simply delete it with the content |
|
|
[ -d /usr/X11R6 ] && rm -rf /usr/X11R6 |
|
132 |
|
|
133 |
# install new toolchain if not exist |
# install new toolchain if not exist |
134 |
TOOLCHAIN="$(< /etc/mage-profile/toolchain.defaults)" |
TOOLCHAIN="$(< /etc/mage-profile/toolchain.defaults)" |