Total Pageviews

Monday 22 January 2018

CharlesTermux

网址在这里:https://github.com/the0demiurge/CharlesTermux

Termux简介

Termux有点像一种Linux发行版(当然不是),使用apt作为包管理器,只支持很有限(却很够用)的部分软件,支持ssh(或者作为ssh服务器),可以用python写代码(虽然好多库都装不上),可以写c语言(有clang编译器和gcc,当然gcc要费点力气才装的上),甚至texlive和graphviz都有。
如果出差的话,可以用安卓平板做紧急开发了,配上realvnc,加上罗技的k380蓝牙键盘,能作为超级本的廉价替代品了。
题外话,上个学期我跨校区上课的时候,用它写论文,很给力。

部署方法

运行命令:apt update;apt install -y curl;bash -c "$(curl -fsSL https://git.io/vdUkk)"

功能

自动解决powerline字体等问题,安装fish,omf,tmux,ipython并配置主题,添加源,可以用apt装scipy,numpy,octave等。
可以自动备份安装列表,fork本项目之后可以将你自己维护的列表上传到自己的github.
-----------

一键脚本https://raw.githubusercontent.com/the0demiurge/CharlesTermux/master/install.sh的内容:

#!/data/data/com.termux/files/usr/bin/bash

apt update
apt install -y git fish curl apt-transport-https gawk tmux vim-python python cowsay sl fortune
pip install ipython powerline-status
clear

if [ -d "$HOME/.termux" ]; then
 mv $HOME/.termux $HOME/.termux.bak
fi

# Setting sources
TUNA=$HOME/../usr/etc/apt/sources.list.d/tuna.list
touch $TUNA
echo '# The termux repository mirror from TUNA:'|tee $TUNA
echo 'deb [arch=all,arm] http://mirrors.tuna.tsinghua.edu.cn/termux stable main'|tee -a $TUNA


git clone https://github.com/the0demiurge/CharlesTermux.git $HOME/.local/share/CharlesTermux

cp -r ~/.local/share/CharlesTermux/data/.termux ~

cd ~/.local/share/CharlesTermux/charles/installation.d/conf.d

./config-bash
./config-fish
./config-git
./config-powerline-ipython
./config-tmux

echo 'After installation, you can edit $CHARLES_BACKUP/termux.list and run `inst (inst) in fish shell to install listed packages automitacally.`'
echo 'After installed oh-my-fish, you can run `omf-backup` to backup omf list recorded in $CHARLES_BACKUP/omf.list and run `omf-restore` to restore.'
read

termux-setup-storage
curl -L https://its-pointless.github.io/setup-pointless-repo.sh | sh
curl -L https://get.oh-my.fish | fish

echo Done!

exit

No comments:

Post a Comment