istenmeyen-locale-silme
This commit is contained in:
parent
7b1e2f82dc
commit
e0d8390f29
59
bin/mps
59
bin/mps
|
@ -13,7 +13,8 @@ talimatname_dizin="/root/talimatname"
|
||||||
kokdizin="/"
|
kokdizin="/"
|
||||||
VT="/var/lib/pkg/DB"
|
VT="/var/lib/pkg/DB"
|
||||||
TARIHCE_DIZIN="/var/lib/pkg/tarihce"
|
TARIHCE_DIZIN="/var/lib/pkg/tarihce"
|
||||||
tekrarkur="evet"
|
tekrarkur="hayir"
|
||||||
|
lokal="tr"
|
||||||
|
|
||||||
|
|
||||||
icerik_ekle(){
|
icerik_ekle(){
|
||||||
|
@ -26,29 +27,27 @@ icerik_ekle(){
|
||||||
bash /tmp/.PRE
|
bash /tmp/.PRE
|
||||||
rm /tmp/.PRE
|
rm /tmp/.PRE
|
||||||
fi
|
fi
|
||||||
mkdir -p tmpk.$paketad
|
mkdir -p kur.$paketad &&
|
||||||
tar xf $1 -C tmpk.$paketad &&
|
tar xf $1 -C kur.$paketad &&
|
||||||
|
#istenmeyen yerellerin silinmesi
|
||||||
|
if [ -d kur.$paketad/usr/share/locale ];then
|
||||||
|
for lkl in `ls kur.$paketad/usr/share/locale/`;do
|
||||||
|
if [ "$lkl" != "$lokal" ];then rm -r kur.$paketad/usr/share/locale/$lkl; fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
mkdir -p /var/lib/pkg/DB/"$paketad" &&
|
mkdir -p /var/lib/pkg/DB/"$paketad" &&
|
||||||
cp -axvnu tmpk.$paketad/* $kokdizin > tmpk.$paketad/kurulan
|
cp -v -afr kur.$paketad/* $kokdizin > kur.$paketad/kurulan &&
|
||||||
cat tmpk.$paketad/kurulan | cut -d '>' -f2 > /var/lib/pkg/DB/"$paketad"/kurulan
|
cp kur.$paketad/kurulan /tmp/ &&cat kur.$paketad/kurulan | cut -d '>' -f2 > /var/lib/pkg/DB/"$paketad"/kurulan &&
|
||||||
#mv tmpk.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files &&
|
#mv kur.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files &&
|
||||||
mv tmpk.$paketad/.META /var/lib/pkg/DB/"$paketad"/META
|
mv kur.$paketad/.META /var/lib/pkg/DB/"$paketad"/META &&
|
||||||
|
|
||||||
#kur-kos calistirilmasi
|
#kur-kos calistirilmasi
|
||||||
if [ -f tmpk.$paketad/.POST ];then
|
if [ -f kur.$paketad/.POST ];then
|
||||||
bash tmpk.$paketad/.POST
|
bash kur.$paketad/.POST
|
||||||
rm tmpk.$paketad/.POST
|
rm kur.$paketad/.POST
|
||||||
fi
|
fi
|
||||||
#if [ -f $kokdizin.PRE ];then
|
|
||||||
# rm $kokdizin.PRE
|
rm -r kur.$paketad
|
||||||
#fi
|
|
||||||
#if [ -f $kokdizin/.okubeni ];then
|
|
||||||
# rm $kokdizin/.okubeni
|
|
||||||
#fi
|
|
||||||
#if [ -f $kokdizin/.README ];then
|
|
||||||
# rm $kokdizin/.README
|
|
||||||
#fi
|
|
||||||
rm -r tmpk.$paketad
|
|
||||||
if [ -f /etc/ld.so.conf ];then
|
if [ -f /etc/ld.so.conf ];then
|
||||||
ldconfig
|
ldconfig
|
||||||
fi
|
fi
|
||||||
|
@ -66,18 +65,18 @@ icerik_ekle2(){
|
||||||
bash /tmp/.PRE
|
bash /tmp/.PRE
|
||||||
rm /tmp/.PRE
|
rm /tmp/.PRE
|
||||||
fi
|
fi
|
||||||
mkdir -p tmpk.$paketad
|
mkdir -p kur.$paketad
|
||||||
tar xf $1 -C tmpk.$paketad &&
|
tar xf $1 -C kur.$paketad &&
|
||||||
mkdir -p $kokdizin/var/lib/pkg/DB/"$paketad" &&
|
mkdir -p $kokdizin/var/lib/pkg/DB/"$paketad" &&
|
||||||
cp -avf tmpk.$paketad/* $kokdizin > tmpk.$paketad/kurulan &&
|
cp -avf kur.$paketad/* $kokdizin > kur.$paketad/kurulan &&
|
||||||
cat tmpk.$paketad/kurulan | cut -d '>' -f2 > $kokdizin/var/lib/pkg/DB/"$paketad"/kurulan
|
cat kur.$paketad/kurulan | cut -d '>' -f2 > $kokdizin/var/lib/pkg/DB/"$paketad"/kurulan
|
||||||
#mv tmpk.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files &&
|
#mv kur.$paketad/.MTREE /var/lib/pkg/DB/"$paketad"/files &&
|
||||||
mv tmpk.$paketad/.META $kokdizin/var/lib/pkg/DB/"$paketad"/META &&
|
mv kur.$paketad/.META $kokdizin/var/lib/pkg/DB/"$paketad"/META &&
|
||||||
|
|
||||||
#kur-kos calistirilmasi
|
#kur-kos calistirilmasi
|
||||||
if [ -f tmpk.$paketad/.POST ];then
|
if [ -f kur.$paketad/.POST ];then
|
||||||
bash tmpk.$paketad/.POST
|
bash kur.$paketad/.POST
|
||||||
rm tmpk.$paketad/.POST
|
rm kur.$paketad/.POST
|
||||||
fi
|
fi
|
||||||
#if [ -f $kokdizin.PRE ];then
|
#if [ -f $kokdizin.PRE ];then
|
||||||
# rm $kokdizin.PRE
|
# rm $kokdizin.PRE
|
||||||
|
@ -88,7 +87,7 @@ icerik_ekle2(){
|
||||||
#if [ -f $kokdizin/.README ];then
|
#if [ -f $kokdizin/.README ];then
|
||||||
# rm $kokdizin/.README
|
# rm $kokdizin/.README
|
||||||
#fi
|
#fi
|
||||||
rm -r tmpk.$paketad
|
rm -r kur.$paketad
|
||||||
if [ -f /tools/sbin/ldconfig ];then
|
if [ -f /tools/sbin/ldconfig ];then
|
||||||
/tools/sbin/ldconfig
|
/tools/sbin/ldconfig
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue