Compare commits
4 commits
87e5b2e655
...
57d260971d
Author | SHA1 | Date | |
---|---|---|---|
57d260971d | |||
36ccc02cde | |||
6b3dc0818a | |||
a5122acea9 |
6 changed files with 91 additions and 55 deletions
65
COPYING
Normal file
65
COPYING
Normal file
|
@ -0,0 +1,65 @@
|
|||
Clumsy Wolf Public License
|
||||
Version 5
|
||||
|
||||
0) You are free to use this package as you wish, except as detailed by clause 3.
|
||||
This freedom includes the freedom to study the source code and change it as
|
||||
you please. To allow you to do so, the source code will be provided to the
|
||||
best of the primary author's ability. If you make any changes, you are under
|
||||
no obligation to notify anyone or share those changes with the original
|
||||
authors of this package.
|
||||
1) You are free to give unmodified copies of this package to anyone you wish,
|
||||
so long as you keep a copy of this license in with it. You are also free to
|
||||
give modified copies of this package to anyone you wish, so long as that
|
||||
package includes a notice stating that the package includes modifications
|
||||
not approved or endorsed by the original authors and the package is released
|
||||
under either this license, including future versions of this license, or any
|
||||
license with similar restrictions, such as the Hippocratic License or the
|
||||
Cooperative Nonviolent Public License.
|
||||
2) If you make and submit any changes to this package, you agree to not pursue
|
||||
any patent claims relating to patents you may hold over any changes you have
|
||||
made.
|
||||
3) This package is not to be used by any individual or organization in a way
|
||||
that promotes, lobbies for, derives income from, or otherwise supports:
|
||||
- sex trafficking or human trafficking
|
||||
- slavery or indentured servitude
|
||||
- any form of child labour
|
||||
- gambling, tobacco, or other adversely addictive behaviours
|
||||
- warfare or weapons manufacturing, including nuclear processes that may
|
||||
contribute to the production of nuclear weapons, regardless of primary
|
||||
usage of said process
|
||||
- environmental destruction, including but not limited to deforestation,
|
||||
pollution of air or waterways, production of fossil fuels or energy by
|
||||
use of fossil fuels (including but not limited to coal--including
|
||||
so-called "clean coal"--oil, or natural gas) or disposal of waste in a
|
||||
way that adversely affects the environment at large
|
||||
- hate speech or discrimination based on age, gender, gender identity,
|
||||
race, sexuality, religion, nationality, and/or ethnicity
|
||||
- fascism, contemporary American conservatism, or any other forms of
|
||||
authoritarianism, including whatever it is China is doing.
|
||||
- authoritarian religious movements, including but not limited to Christian
|
||||
dominionism and Christian Reconstruction, Islamic jihadism, Hindutva, or
|
||||
any other attempt at theocracy
|
||||
- surveillance at any level, whether individual or large-scale
|
||||
- incarceration of any human being
|
||||
Additionally, commercial use of this package is only permitted by individuals
|
||||
or worker-owned cooperatives.
|
||||
4) THIS PACKAGE COMES WITH NO WARRANTY TO THE EXTENT PERMITTED BY LAW, EXCEPT
|
||||
WHERE OTHERWISE STATED IN WRITING. THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THIS PACKAGE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
|
||||
THE QUALITY AND PERFORMANCE OF THIS PACKAGE IS WITH YOU. SHOULD THIS PACKAGE
|
||||
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR
|
||||
CORRECTION
|
||||
5) IN NO EVENT, UNLESS REQUIRED BY LAW OR AGREED TO IN WRITING, WILL ANY
|
||||
COPYRIGHT HOLDER OR OTHER PARTY WHO MODIFIES/DISTRIBUTES THIS PACKAGE AS
|
||||
PERMITTED ABOVE BE LIABLE TO YOU FOR DAMAGE, INCLUDING ANY GENERAL, SPECIAL,
|
||||
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
|
||||
USE THE PROGRAM, EVEN IF SUCH HOLDER OR OTHER PARTIES HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
6) If you are distributing any version of this package, you are permitted to
|
||||
replace this license with CWPL v5l, v5w, or v5lw which removes the
|
||||
disclaimers in clauses 4 and/or 5, under the strict condition that you
|
||||
include in the package a notice that it is you who is offering the warranty
|
||||
and/or assumption of liability and not the original developers of this
|
||||
package.
|
43
LICENSE
43
LICENSE
|
@ -1,43 +0,0 @@
|
|||
Clumsy Wolf Public License
|
||||
Version 2
|
||||
|
||||
0) You are free to use this package as you wish, for any purpose and
|
||||
to study the source code and change it to your liking. To allow
|
||||
you to do so, the souce code will be provided to the best of the
|
||||
primary author's ability. If you make changes, you are under no
|
||||
obligation to notify anyone or share those changes with the
|
||||
original authors of this package.
|
||||
1) You are free to give unmodified copies of this package to anyone
|
||||
you wish, so long as you keep a copy of this license in with it.
|
||||
You are also free to give modified copies of this package to
|
||||
anyone you wish, so long as that package is licensed under this
|
||||
license, including future versions of this license, or any less
|
||||
restrictive license. Additionally, any modified version should
|
||||
include a note stating that you modified the package.
|
||||
2) If you make any changes to this package, you agree to not pursue
|
||||
patent claims relating to any patents you may hold over the
|
||||
changes you have made.
|
||||
3) THIS PACKAGE COMES WITH NO WARRANTY TO THE EXTENT PERMITTED BY
|
||||
LAW. EXCEPT WHERE OTHERWISE STATED IN WRITING, THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THIS PACKAGE "AS IS"
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE
|
||||
RISK AS TO THE QUALITY AND PERFORMANCE OF THIS PACKAGE IS WITH
|
||||
YOU. SHOULD THIS PACKAGE PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
|
||||
4) IN NO EVENT, UNLESS REQUIRED BY LAW OR AGREED TO IN WRITING,
|
||||
WILL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MODIFIES/
|
||||
DISTRIBUTES THIS PACKAGE AS PERMITTED ABOVE BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
|
||||
THE PROGRAM, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
5) If you are distributing any version of this package, you are
|
||||
permitted to remove the disclaimers in section 3 and 4. However,
|
||||
you must include in the distribution a notice about the extent of
|
||||
the warranty and/or liability, as well as a disclaimer that it is
|
||||
you who is offering the warranty and/or assumption of liability
|
||||
and *not* the original developers of this package. Additionally,
|
||||
remove this section from the license file, and renumber any
|
||||
sections following the section(s) removed.
|
12
README
12
README
|
@ -4,7 +4,7 @@ fenutils - Fenix Core Utilities
|
|||
fenutils is a collection of utilities used in Fenix. Many of these utilities
|
||||
are defined by POSIX and are portable across UNIX and UNIX-like systems. Many
|
||||
are also capable of functioning as a drop-in replacement for the version that
|
||||
may be found on such a system.
|
||||
may be found on such a system, assuming non-POSIX functionality is not required.
|
||||
|
||||
Currently, the following tools are completed, working, and POSIX-compliant:
|
||||
|
||||
|
@ -19,16 +19,13 @@ false
|
|||
head
|
||||
link
|
||||
ln
|
||||
logger
|
||||
logname
|
||||
pwd
|
||||
rmdir
|
||||
true
|
||||
uname
|
||||
|
||||
The following sh built-ins are completed, working, and POSIX-compliant:
|
||||
|
||||
cd
|
||||
|
||||
The following tools are completed and working, though not necessarily
|
||||
POSIX-compliant (a.k.a. I'm not confident about these):
|
||||
|
||||
|
@ -39,13 +36,8 @@ The following tools are working, but not complete or POSIX-compliant:
|
|||
|
||||
cal
|
||||
mkfifo
|
||||
sh
|
||||
wc
|
||||
|
||||
The following sh built-ins are working, but not complete or POSIX-compliant:
|
||||
kill
|
||||
umask
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
|
|
2
TODO
2
TODO
|
@ -109,7 +109,7 @@ link O |
|
|||
ln O |
|
||||
locale >
|
||||
localedef >
|
||||
logger >
|
||||
logger O | M
|
||||
login >
|
||||
logname O |
|
||||
lp >
|
||||
|
|
22
logger.c
Normal file
22
logger.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
if(argc == 1) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int i = 1;
|
||||
FILE * log = fopen("/var/log/messages", "a+");
|
||||
if(log == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
fprintf(log, "\n");
|
||||
for(i = 1; i < argc - 1; i++) {
|
||||
fprintf(log, "%s ", argv[i]);
|
||||
}
|
||||
fprintf(log, "%s", argv[i]);
|
||||
|
||||
fclose(log);
|
||||
return 0;
|
||||
}
|
2
makefile
2
makefile
|
@ -7,7 +7,7 @@ mandir = $(prefix)/man
|
|||
INSTALLPROGRAM = \install
|
||||
|
||||
UTILS = asa basename cat cksum cmp dirname echo expand false head link ln \
|
||||
logname mkfifo pwd rmdir sleep tee true tty uname wc
|
||||
logger logname mkfifo pwd rmdir sleep tee true tty uname wc
|
||||
|
||||
all: $(UTILS)
|
||||
|
||||
|
|
Loading…
Reference in a new issue