Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 40 additions & 23 deletions clients/earthtrack/install
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
#!/bin/bash
# Script to install earthtrack/earthtrack2
#
if [ ! -x $PWD/earthtrack ]; then
$PWD/build
fi

whoami=`whoami`

if [ $whoami != "root" ]; then
echo "Sorry, $whoami. You need to be 'root' to install this program. :-("
else
rm -f /usr/local/bin/earthtrack
ln -s $PWD/earthtrack /usr/local/bin/earthtrack
fi

if [ ! -x /usr/local/bin/earthtrack2 ]; then
if [ $whoami != "root" ]; then
echo "Please su to root and re-run the 'install' script again."
else
ln -s /usr/local/bin/earthtrack /usr/local/bin/earthtrack2
fi
fi
Building and Installating "earthtrack"
======================================

To build "earthtrack", simply invoke the "build" script as follows:

./build

You do not need to be root to build "earthtrack".

To run "earthtrack" globally on a multiuser system, it must be
installed in a publically accessible directory within the $PATH
of your users. To so this, simply invoke the "install" script
from this directory as follows:

./install

This must be done as root.

Once the program has been installed, it may be modified and rebuilt
at any time by invoking the "build" script once again. It is not
necessary to re-run "install" script or su to root every time
the program is modified. HOWEVER, you may wish to protect
the installation directory used by this program to prevent
unauthorized modification and compilation of the source
code when installed on a multiuser system.

If you are root, and are installing "earthtrack" for the first time,
you may build and install this application with just one command by
involking the "install" script as follows:

./install

See the README file for more information on the use and capabilities
of this program.


Happy Tracking!

73, de John, KD2BD

55 changes: 39 additions & 16 deletions clients/kep_reload/install
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
#!/bin/bash
# Script to install kep_reload
#
if [ ! -x $PWD/kep_reload ]; then
$PWD/build
fi

whoami=`whoami`

if [ $whoami != "root" ]; then
echo "Sorry, $whoami. You need to be 'root' to install this program. :-("
echo "Please su to root and re-run the 'install' script again."
else
rm -f /usr/local/bin/kep_reload
ln -s $PWD/kep_reload /usr/local/bin/kep_reload
fi
Building and Installating "kep_reload"
======================================

To build "kep_reload", simply invoke the "build" script as follows:

./build

You do not need to be root to build "kep_reload".

To run "kep_reload" globally on a multiuser system, it must be
installed in a publically accessible directory within the $PATH
of your users. To so this, simply invoke the "install" script
from this directory as follows:

./install

This must be done as root.

Once the program has been installed, it may be modified and rebuilt
at any time by invoking the "build" script once again. It is not
necessary to re-run "install" script or su to root every time
the program is modified. HOWEVER, you may wish to protect
the installation directory used by this program to prevent
unauthorized modification and compilation of the source
code when installed on a multiuser system.

If you are root, and are installing "kep_reload" for the first time,
you may build and install this application with just one command by
involking the "install" script as follows:

./install

See the README file for more information on the use and capabilities
of this program.


Happy Tracking!

73, de John, KD2BD

33 changes: 33 additions & 0 deletions get_time_test.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#define SEC_PER_DAY 86400
#define SEC_PER_HOUR 3600
#define SEC_PER_MIN 60

int main() {
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
printf("TimeZone-1 = %d\n", tz.tz_minuteswest);
printf("TimeZone-2 = %d\n", tz.tz_dsttime);
// Cast members as specific type of the members may be various
// signed integer types with Unix.
printf("TimeVal-3 = %lld\n", (long long) tv.tv_sec);
printf("TimeVal-4 = %lld\n", (long long) tv.tv_usec);

// Form the seconds of the day
long hms = tv.tv_sec % SEC_PER_DAY;
hms += tz.tz_dsttime * SEC_PER_HOUR;
hms -= tz.tz_minuteswest * SEC_PER_MIN;
// mod `hms` to insure in positive range of [0...SEC_PER_DAY)
hms = (hms + SEC_PER_DAY) % SEC_PER_DAY;

// Tear apart hms into h:m:s
int hour = hms / SEC_PER_HOUR;
int min = (hms % SEC_PER_HOUR) / SEC_PER_MIN;
int sec = (hms % SEC_PER_HOUR) % SEC_PER_MIN; // or hms % SEC_PER_MIN

printf("Current local time: %d:%02d:%02d\n", hour, min, sec);
return 0;
}
2 changes: 1 addition & 1 deletion installer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
// #include <sys/soundcard.h>

char version[10];

Expand Down
Loading