mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 05:46:01 +02:00
Clean up package function for python3
``|| return 1`` is very old syntax and is no longer needed. And, the ``install`` command can handle directory creation and file installation in the same command which cuts a great deal of unnecessary commands out. Also, remember, ``msg2`` in the package function will be printed during the making of the package, not during the installation. Thus, instead of ``msg2`` (as they really serve only as documentation), comments should be preferred.
This commit is contained in:
parent
c1ae7f3598
commit
b0c5c05924
@ -30,29 +30,23 @@ pkgver() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${_gitname}"
|
cd "${_gitname}"
|
||||||
python setup.py install --root="${pkgdir}" --optimize=1 || return 1
|
python setup.py install --root="${pkgdir}" --optimize=1
|
||||||
|
|
||||||
msg2 "Installing fonts..."
|
# Fonts
|
||||||
install -dm755 "${pkgdir}/usr/share/fonts/OTF/"
|
|
||||||
install -dm755 "${pkgdir}/etc/fonts/conf.avail"
|
|
||||||
install -dm755 "${pkgdir}/etc/fonts/conf.d"
|
install -dm755 "${pkgdir}/etc/fonts/conf.d"
|
||||||
install -m644 "font/PowerlineSymbols.otf" "${pkgdir}/usr/share/fonts/OTF/PowerlineSymbols.otf"
|
install -Dm644 "font/PowerlineSymbols.otf" "${pkgdir}/usr/share/fonts/OTF/PowerlineSymbols.otf"
|
||||||
install -m644 "font/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.avail/10-powerline-symbols.conf"
|
install -Dm644 "font/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.avail/10-powerline-symbols.conf"
|
||||||
ln -s "../conf.avail/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.d/10-powerline-symbols.conf"
|
ln -s "../conf.avail/10-powerline-symbols.conf" "${pkgdir}/etc/fonts/conf.d/10-powerline-symbols.conf"
|
||||||
|
|
||||||
msg2 "Installing vim plugin..."
|
# Vim Plugin
|
||||||
install -dm755 "${pkgdir}/usr/share/vim/vimfiles/plugin"
|
install -Dm644 "powerline/bindings/vim/plugin/powerline.vim" "${pkgdir}/usr/share/vim/vimfiles/plugin/powerline.vim"
|
||||||
install -m644 "powerline/bindings/vim/plugin/powerline.vim" "${pkgdir}/usr/share/vim/vimfiles/plugin/powerline.vim"
|
|
||||||
|
|
||||||
msg2 "Installing zsh plugin..."
|
# Zsh Plugin
|
||||||
install -dm755 "${pkgdir}/usr/share/zsh/site-contrib"
|
install -Dm644 "powerline/bindings/zsh/powerline.zsh" "${pkgdir}/usr/share/zsh/site-contrib/powerline.zsh"
|
||||||
install -m644 "powerline/bindings/zsh/powerline.zsh" "${pkgdir}/usr/share/zsh/site-contrib/powerline.zsh"
|
|
||||||
|
|
||||||
msg2 "Installing tmux configuration..."
|
# Tmux Configuration
|
||||||
install -dm755 "${pkgdir}/usr/share/tmux"
|
install -Dm644 "powerline/bindings/tmux/powerline.conf" "${pkgdir}/usr/share/tmux/powerline.conf"
|
||||||
install -m644 "powerline/bindings/tmux/powerline.conf" "${pkgdir}/usr/share/tmux/powerline.conf"
|
|
||||||
|
|
||||||
msg2 "Installing license..."
|
# License
|
||||||
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
install -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user