milislinux-saat.paketlendi

This commit is contained in:
milisman 2017-02-14 01:51:55 +02:00
parent b0505fa175
commit d8a27041e2
4 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,58 @@
#!/bin/sh
# Milislinux uyarlı zaman ayarlama betiği
if [ ! -d "/var/lib/pkg/DB/xdialog" ];then
echo "xdialog paketini kurunuz-> mps kur xdialog"
exit 1
fi
HWCLOCK=/sbin/hwclock
if [ -f "/usr/sbin/hwclock" ];then
HWCLOCK=/usr/sbin/hwclock
fi
if [ "`whoami`" != "root" ];then
Xdialog --title "$TITLE" --msgbox "root çalıştır!..." 0 0
exit 1
fi
# Title to be used for all Xdialog boxes.
TITLE="Saat Ayarlama Aracı"
# Now check for hwclock existence...
if ! [ -f $HWCLOCK ] ; then
Xdialog --title "$TITLE" --msgbox "$HWCLOCK bulunamadı..." 0 0
exit 0
fi
# Get the date (returned in DD/MM/YYYY format by Xdialog.
ENTEREDDATE=`Xdialog --stdout --title "$TITLE" --calendar "Tarihi ayarlayın..." 0 0 0 0 0`
#xmessage $?
if [ "$?" != "0" ] ; then
Xdialog --title "$TITLE" --msgbox "İptal edildi." 0 0
exit 0
fi
# Convert the date to the MM/DD/YYYY format needed by hwclock.
NEWDATE=`echo "$ENTEREDDATE" | awk --source 'BEGIN { FS="/" }' --source '{ print $2 "/" $1 "/" $3 }'`
# Get the time in HH:MM:SS format.
NEWTIME=`Xdialog --stdout --title "$TITLE" --timebox "Zamanı ayarlayın..." 0 0`
if [ "$?" != "0" ] ; then
Xdialog --title "$TITLE" --msgbox "Aborted." 0 0
exit 0
fi
# Set the hardware clock (RTC) and then the system clock
Xdialog --title "bilgi" --msgbox "Gerekli ayarlamalar yapılıyor..." 0 0
$HWCLOCK --set --date="$NEWDATE $NEWTIME"&&$HWCLOCK --hctosys
THEDATE=`date`
Xdialog --title "bilgi" --msgbox "Zaman ayarlama yapıldı. $THEDATE" 0 0

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Path=/usr/bin/milis-saat
Name=Milis Saat Ayarlama Uygulaması
Comment=Milis Saat Ayarlama Uygulaması
Exec=/usr/bin/milislinux-saat
Terminal=false
Type=Application
Icon=milislinux-saat
Categories=System;

View File

@ -0,0 +1,23 @@
/* XPM */
static char * icon_xpm[] = {
"16 16 4 1",
" c None",
". c #000000",
"+ c #C0C0C0",
"@ c #FFFFFF",
" ",
" ..... ",
" ..@@@@@.. ",
" .+@@@.@@@+. ",
" .@@@@.@@@@. ",
" .@@@@@.@@@@@. ",
" .@@@@@.@@@@@. ",
" .@@@@..@@@@@. ",
" .@@@@@..@@@@. ",
" .@@@@@.@.@@@. ",
" .@@@@@@@@@. ",
" .+@@@@@@@+. ",
" ..@@@@@.. ",
" ..... ",
" ",
" "};

View File

@ -0,0 +1,20 @@
# Description: milislinux saat ayarlama uygulaması
# URL: http://milis.gungre.ch/
# Packager: milisarge
# Depends on: xdialog
name=milislinux-saat
version=1.0
release=1
source=(kk_milislinux-saat
milislinux-saat.xpm
milislinux-saat.desktop)
build () {
install -d "$PKG/usr/share/pixmaps"
install -d "$PKG/usr/share/applications"
install -d "$PKG/usr/bin"
cp $SRC/kk_milislinux-saat "$PKG/usr/bin/milislinux-saat"
cp $SRC/milislinux-saat.desktop "$PKG/usr/share/applications"
cp $SRC/milislinux-saat.xpm "$PKG/usr/share/pixmaps"
}