1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-23 13:33:45 +01:00
This commit is contained in:
2017-02-20 21:01:08 +01:00
parent 65562e0f1d
commit d279dc877b
7 changed files with 44 additions and 1577 deletions

View File

@@ -1,11 +1,51 @@
#!/usr/bin/python3
## This script requires ArchLinux, reflector, python3 and python-pythondialog
#!/usr/bin/python
## This script requires ArchLinux and: python3 and python-pythondialog, or python2, python2-pythondialog and python2-future
###### THIS SCRIPT NOT WORKS, ITS A TRY, THANKS ######
print ('\033[91m'+"Dont run this."+'\033[0m')
import sys; sys.exit(0)
sys.exit(0)
#General imports (Python2 and 3)
import os,sys,subprocess
#Install and delete things, preparing installer
subprocess.call("mount -o remount,size=700M /run/archiso/cowspace", shell=True)
subprocess.call("pacman-key --init && pacman-key --populate && pacman -Sy archlinux-keyring --noconfirm", shell=True)
subprocess.call("pacman -S reflector --noconfirm && reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist", shell=True)
subprocess.call("pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime openconnect pcsclite --noconfirm", shell=True)
subprocess.call("rm -rf /var/cache/pacman/pkg/*", shell=True)
subprocess.call("pacman -Su --noconfirm --ignore linux", shell=True)
subprocess.call("rm -rf /var/cache/pacman/pkg/*", shell=True)
subprocess.call("pacman -S gparted xf86-video-vesa xorg-xinit lwm xorg-xrandr xterm --noconfirm --needed", shell=True)
subprocess.call("rm -rf /var/cache/pacman/pkg/*", shell=True)
subprocess.call("rm /etc/X11/xinit/xinitrc", shell=True)
subprocess.call("touch /etc/X11/xinit/xinitrc", shell=True)
subprocess.call("chmod 777 /etc/X11/xinit/xinitrc", shell=True)
subprocess.call('echo "#Start gparted with startx command" > /etc/X11/xinit/xinitrc', shell=True)
subprocess.call('echo "lwm &" >> /etc/X11/xinit/xinitrc', shell=True)
subprocess.call('echo "xrandr -s 1024x768 -r 60" >> /etc/X11/xinit/xinitrc', shell=True)
subprocess.call('chmod 644 /etc/X11/xinit/xinitrc', shell=True)
### sudo echo "xterm -e '/usr/bin/python3 /root/installer.py' -geometry 120x35" >> /etc/X11/xinit/xinitrc
#Try to see if its using python2
pythonver=sys.version_info[0]
if pythonver < 3:
print 'You are using python2, installing needed things..'
subprocess.call("pacman -S python2-future python2-pythondialog --noconfirm --needed", shell=True)
#Import future for using python3 syntax in python2
from __future__ import (absolute_import, division, print_function, unicode_literals)
from builtins import *
else:
print 'You are using python3, installing needed things..'
subprocess.call("pacman -S python-pythondialog --noconfirm --needed", shell=True)
#Things installed, running...
import os, subprocess
from dialog import Dialog
dialog = Dialog(dialog="dialog")
FNULL = open(os.devnull, 'w')