Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mxapt: BANG!
- Here it is
  • Loading branch information
wwwutz committed Aug 22, 2022
0 parents commit 06d888a
Show file tree
Hide file tree
Showing 10 changed files with 119,772 additions and 0 deletions.
14 changes: 14 additions & 0 deletions install.sh
@@ -0,0 +1,14 @@
#!/bin/bash -x

mkdir -p ${DESTDIR}/usr/bin
cp src/apt.sh ${DESTDIR}/usr/bin/apt

ln -fs apt ${DESTDIR}/usr/bin/apt-get

mkdir -p ${DESTDIR}/usr/share/man/man1
cp src/apt.1 ${DESTDIR}/usr/share/man/man1

mkdir -p ${DESTDIR}/usr/share/mxapt
for f in src/*.txt; do
cp "$f" ${DESTDIR}/usr/share/mxapt/$(basename "$f")
done
25 changes: 25 additions & 0 deletions src/apt.1
@@ -0,0 +1,25 @@
.\" Automatically generated by Pandoc 2.5
.\"
.TH "APT" "1" "" "" "Mariux Tools Documentation"
.hy
.SH NAME
.PP
\f[B]apt\f[R] \- prevent installation of ubuntu packages
.SH SYNOPSIS
.PP
\f[B]apt command\f[R]
.SH DESCRIPTION
.PP
\f[B]apt\f[R] uses an annoying technique to prevent users from thinking
MarIiX is apt based
.SH EXAMPLES
.TP
.B \f[B]install python\f[R]
apt\-get install python
call/email helpdesk
.SH BUGS/FEATURES
.PP
\f[B]apt\f[R] does not work as expected
.SH SEE ALSO
.PP
\f[B]man(1)\f[R]
34 changes: 34 additions & 0 deletions src/apt.md
@@ -0,0 +1,34 @@
% APT(1) | Mariux Tools Documentation

NAME
====

**apt** - prevent installation of ubuntu packages

SYNOPSIS
========

| **apt command**

DESCRIPTION
===========

**apt** uses an annoying technique to prevent users from thinking MarIiX is apt based

EXAMPLES
========

**install python**
: apt-get install python
: call/email helpdesk

BUGS/FEATURES
=============

**apt** does not work as expected

SEE ALSO
========

**man(1)**

30 changes: 30 additions & 0 deletions src/apt.sh
@@ -0,0 +1,30 @@
#!/bin/bash
# perl -pix -e 'NEGIN{@x=(qw(reinstalled preinstalled retried compiled build bought sold copied))};s/,focal/,linux/;s/ubuntu/mariux/g;if(m{a\w+\r\n}){$x=$x[rand(8)];s/\r/ [$x]/;}' list.txt
# pandoc --standalone --to man apt.md -o apt.1
cmd=$1
arg=$2
tmax=200

PREFIX=/usr/share/mxapt

if [ -e ${PREFIX}/${cmd}.txt ] ; then
while IFS= read -r l; do
l=${l/\$arg\$/${arg}};
r=$(printf '%d' $(( $RANDOM % 90000 + 1 )) )
r2=$(printf '%2d' $(( $RANDOM % 100 )) )
r6=$(printf '%6d' $(( $RANDOM % 900000 + 100000 )) )
rv=$(printf '%d.%d.%d' $(( $RANDOM % 10 )) $(( $RANDOM % 99 )) $(( $RANDOM % 150 )))
l=${l/\$r\$/${r}};
l=${l/\$r2\$/${r2}};
l=${l/\$r6\$/${r6}};
l=${l/\$rv\$/${rv}};
l=${l//[0-9].[0-9]/$(( $RANDOM % 10 )).$(( $RANDOM % 10 ))};
printf '%s\n' "$l"

t=$(printf '0.%03d' $(( $RANDOM % $tmax + 10 )) )
sleep $t
done < ${PREFIX}/${cmd}.txt
else
cat ${PREFIX}/error.txt
exit 1
fi
40 changes: 40 additions & 0 deletions src/error.txt
@@ -0,0 +1,40 @@

apt 4.8.1 (mx64)
Usage: apt [options] command

apt is a commandline package manager and does not provide commands for
searching and managing as well as querying information about debian packages.
It provides the same functionality as the none of the specialized APT tools,
like apt-get and apt-cache. Most enabled options are more suitable for
interactive use by default. It does not work on MarIuX.

Most commonly used wrong commands:
list - list packages based on package names
search - search in package descriptions
show - show package details
install - install packages
reinstall - reinstall packages
remove - remove packages
autoremove - Remove automatically all unused packages
update - update list of available packages
upgrade - upgrade the system by installing/upgrading packages
full-upgrade - upgrade the system by removing/installing/upgrading packages
edit-sources - edit the source information file
satisfy - satisfy dependency strings

All [options] are ignored:
-y year of birth
-v verbose
-h holymoly
-i index
-e external
-h http{s,x}2.local:[port]//{cgi}
-j jpeg

Do not try to see apt(8) for more information about the available commands.
Configuration options and syntax is not detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
This APT has Super Cow Powers.
q

0 comments on commit 06d888a

Please sign in to comment.