Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
27aa9df2
Commit
27aa9df2
authored
Jul 01, 2017
by
Herdiansyah
Committed by
GitHub
Jul 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #754 from konimex/install-sh
Misc: Removed Makefile and added install script
parents
eeaffac7
a31a445e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
49 deletions
+43
-49
Makefile
Makefile
+0
-20
install.sh
install.sh
+37
-0
neofetch
neofetch
+6
-29
No files found.
Makefile
deleted
100644 → 0
View file @
eeaffac7
PREFIX
=
/usr
all
:
@
echo
Run
\'
make
install
\'
to
install
Neofetch
install
:
mkdir
-p
$(DESTDIR)$(PREFIX)
/bin
mkdir
-p
$(DESTDIR)$(PREFIX)
/share/man/man1
mkdir
-p
$(DESTDIR)
/etc/neofetch
mkdir
-p
$(DESTDIR)$(PREFIX)
/share/neofetch/ascii/distro
cp
-p
neofetch
$(DESTDIR)$(PREFIX)
/bin/neofetch
cp
-p
neofetch.1
$(DESTDIR)$(PREFIX)
/share/man/man1/neofetch.1
cp
-p
config/config
$(DESTDIR)
/etc/neofetch/config
cp
-p
ascii/distro/
*
$(DESTDIR)$(PREFIX)
/share/neofetch/ascii/distro
uninstall
:
rm
-f
$(DESTDIR)$(PREFIX)
/bin/neofetch
rm
-f
$(DESTDIR)$(PREFIX)
/share/man/man1/neofetch.1
rm
-f
-r
$(DESTDIR)$(PREFIX)
/share/neofetch
rm
-f
-r
$(DESTDIR)
/etc/neofetch
install.sh
0 → 100755
View file @
27aa9df2
#!/bin/sh
while
[
"
$1
"
]
;
do
case
"
$1
"
in
"--destdir"
)
DESTDIR
=
"
$2
"
;;
"--bindir"
)
BINDIR
=
"
$2
"
;;
"--confdir"
)
CONFDIR
=
"
$2
"
;;
"--prefix"
)
PREFIX
=
"
$2
"
;;
"--asciidir"
)
ASCIIDIR
=
"
$2
"
;;
"--mandir"
)
MANDIR
=
"
$2
"
;;
esac
shift
done
if
[
-z
"
$PREFIX
"
]
;
then
[
-z
"
$BINDIR
"
]
&&
BINDIR
=
"/usr/bin"
[
-z
"
$ASCIIDIR
"
]
&&
ASCIIDIR
=
"/usr/share/neofetch/ascii/distro"
[
-z
"
$MANDIR
"
]
&&
MANDIR
=
"/usr/share/man/man1"
else
[
-z
"
$BINDIR
"
]
&&
BINDIR
=
"/bin"
[
-z
"
$ASCIIDIR
"
]
&&
ASCIIDIR
=
"/share/neofetch/ascii/distro"
[
-z
"
$MANDIR
"
]
&&
MANDIR
=
"/share/man/man1"
fi
[
-z
"
$CONFDIR
"
]
&&
CONFDIR
=
"/etc/neofetch"
mkdir
-p
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
BINDIR
}
"
mkdir
-p
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
CONFDIR
}
"
mkdir
-p
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
ASCIIDIR
}
"
mkdir
-p
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
MANDIR
}
"
sed
-i
-e
"s|CONFDIR|
${
PREFIX
}${
CONFDIR
}
|g"
neofetch
sed
-i
-e
"s|ASCIIDIR|
${
PREFIX
}${
ASCIIDIR
}
|g"
neofetch
cp
-p
neofetch
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
BINDIR
}
"
cp
-p
config/config.conf
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
CONFDIR
}
"
cp
-p
ascii/distro/
*
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
ASCIIDIR
}
"
cp
-p
neofetch.1
"
${
DESTDIR
}
""
${
PREFIX
}
""
${
MANDIR
}
"
neofetch
View file @
27aa9df2
...
@@ -2203,18 +2203,8 @@ get_ascii() {
...
@@ -2203,18 +2203,8 @@ get_ascii() {
[[ "
$image_source
" =~
\.
(png|jpg|jpe|jpeg|gif)
$
]] &&
\
[[ "
$image_source
" =~
\.
(png|jpg|jpe|jpeg|gif)
$
]] &&
\
err "
Image: Source is image file but ascii backend was selected. Using distro ascii.
"
err "
Image: Source is image file but ascii backend was selected. Using distro ascii.
"
if [[ -d "
/usr/share/neofetch/ascii/distro
" ]]; then
if [[ -d "
ASCIIDIR
" ]]; then
ascii_dir="
/usr/share/neofetch/ascii/distro
"
ascii_dir="
ASCIIDIR
"
elif [[ -d "
/usr/local/share/neofetch/ascii/distro
" ]]; then
ascii_dir="
/usr/local/share/neofetch/ascii/distro
"
elif [[ -d "
/data/data/com.termux/files/usr/share/neofetch/ascii/distro
" ]]; then
ascii_dir="
/data/data/com.termux/files/usr/share/neofetch/ascii/distro
"
elif [[ -d "
/boot/home/config/non-packaged/share/neofetch/ascii/distro
" ]]; then
ascii_dir="
/boot/home/config/non-packaged/share/neofetch/ascii/distro
"
else
else
[[ -z "
$script_dir
" ]] && script_dir="
$(
get_full_path
"
$0
"
)
"
[[ -z "
$script_dir
" ]] && script_dir="
$(
get_full_path
"
$0
"
)
"
ascii_dir="
${
script_dir
%/*
}
/ascii/distro
"
ascii_dir="
${
script_dir
%/*
}
/ascii/distro
"
...
@@ -3602,17 +3592,8 @@ get_full_path() {
...
@@ -3602,17 +3592,8 @@ get_full_path() {
}
}
get_default_config() {
get_default_config() {
if [[ -f "/etc/neofetch/config.conf" ]]; then
if [[ -f "CONFDIR/config.conf" ]]; then
default_config="/etc/neofetch/config.conf"
default_config="CONFDIR/config.conf"
elif [[ -f "/usr/local/etc/neofetch/config.conf" ]]; then
default_config="/usr/local/etc/neofetch/config.conf"
elif [[ -f "/data/data/com.termux/files/usr/etc/neofetch/config.conf" ]]; then
default_config="/data/data/com.termux/files/usr/etc/neofetch/config.conf"
elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config.conf" ]]; then
default_config="/boot/home/config/non-packaged/etc/neofetch/config.conf"
else
else
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
[[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")"
...
@@ -3644,12 +3625,8 @@ get_user_config() {
...
@@ -3644,12 +3625,8 @@ get_user_config() {
elif
[[
-f
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
]]
;
then
elif
[[
-f
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
]]
;
then
config_file
=
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
config_file
=
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
elif
[[
-f
"/etc/neofetch/config.conf"
]]
;
then
elif
[[
-f
"CONFDIR/config.conf"
]]
;
then
cp
"/etc/neofetch/config.conf"
"
${
XDG_CONFIG_HOME
}
/neofetch"
cp
"CONFDIR/config.conf"
"
${
XDG_CONFIG_HOME
}
/neofetch"
config_file
=
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
elif
[[
-f
"/usr/local/etc/neofetch/config.conf"
]]
;
then
cp
"/usr/local/share/neofetch/config.conf"
"
${
XDG_CONFIG_HOME
}
/neofetch"
config_file
=
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
config_file
=
"
${
XDG_CONFIG_HOME
}
/neofetch/config.conf"
else
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment