Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tools
development-tools
manjaro-tools
Commits
56b4672f
Commit
56b4672f
authored
Mar 04, 2016
by
udeved
Browse files
Merge branch 'devel' of github.com:manjaro/manjaro-tools
parents
028f4503
1dc80fcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/util-iso-boot.sh
View file @
56b4672f
...
...
@@ -35,12 +35,17 @@ set_mkinicpio_hooks(){
fi
}
set_silent_switch_root
(){
sed
-e
's|"$@"|"$@" >/dev/null 2>&1|'
-i
$1
/usr/lib/initcpio/init
}
copy_initcpio
(){
msg2
"Copying initcpio ..."
cp
/usr/lib/initcpio/hooks/miso
*
$2
/usr/lib/initcpio/hooks
cp
/usr/lib/initcpio/install/miso
*
$2
/usr/lib/initcpio/install
cp
$1
/mkinitcpio.conf
$2
/etc/mkinitcpio-
${
iso_name
}
.conf
set_mkinicpio_hooks
"
$2
/etc/mkinitcpio-
${
iso_name
}
.conf"
set_silent_switch_root
"
$2
"
}
# $1: work_dir
...
...
lib/util-iso-image.sh
View file @
56b4672f
...
...
@@ -444,26 +444,50 @@ chroot_create(){
mkchroot
${
mkchroot_args
[*]
}
${
flag
}
$@
}
# $1: image path
clean_up_image
(){
msg2
"Cleaning up [%s]"
"
${
1
##*/
}
"
[[
-d
"
$1
/boot/"
]]
&&
find
"
$1
/boot"
-name
'initramfs*.img'
-delete
#&> /dev/null
[[
-f
"
$1
/etc/locale.gen.bak"
]]
&&
mv
"
$1
/etc/locale.gen.bak"
"
$1
/etc/locale.gen"
[[
-f
"
$1
/etc/locale.conf.bak"
]]
&&
mv
"
$1
/etc/locale.conf.bak"
"
$1
/etc/locale.conf"
find
"
$1
/var/lib/pacman"
-maxdepth
1
-type
f
-delete
#&> /dev/null
find
"
$1
/var/lib/pacman/sync"
-type
f
-delete
#&> /dev/null
#find "$1/var/cache/pacman/pkg" -type f -delete &> /dev/null
find
"
$1
/var/log"
-type
f
-delete
#&> /dev/null
#find "$1/var/tmp" -mindepth 1 -delete &> /dev/null
#find "$1/tmp" -mindepth 1 -delete &> /dev/null
msg2
"Cleaning [%s]"
"
${
1
##*/
}
"
local
path
if
[[
${
1
##*/
}
==
'mhwd-image'
]]
;
then
path
=
$1
/var
if
[[
-d
$path
]]
;
then
find
"
$path
"
-mindepth
0
-delete
&> /dev/null
fi
path
=
$1
/etc
if
[[
-d
$path
]]
;
then
find
"
$path
"
-mindepth
0
-delete
&> /dev/null
fi
rm
-f
"
$1
/cache-packages.txt"
else
[[
-f
"
$1
/etc/locale.gen.bak"
]]
&&
\
mv
"
$1
/etc/locale.gen.bak"
"
$1
/etc/locale.gen"
[[
-f
"
$1
/etc/locale.conf.bak"
]]
&&
\
mv
"
$1
/etc/locale.conf.bak"
"
$1
/etc/locale.conf"
path
=
$1
/boot
if
[[
-d
"
$path
"
]]
;
then
find
"
$path
"
-name
'initramfs*.img'
-delete
&> /dev/null
fi
path
=
$1
/var/lib/pacman/sync
if
[[
-d
$path
]]
;
then
find
"
$path
"
-type
f
-delete
&> /dev/null
fi
path
=
$1
/var/cache/pacman/pkg
if
[[
-d
$path
]]
;
then
find
"
$path
"
-type
f
-delete
&> /dev/null
fi
path
=
$1
/var/log
if
[[
-d
$path
]]
;
then
find
"
$path
"
-type
f
-delete
&> /dev/null
fi
path
=
$1
/var/tmp
if
[[
-d
$path
]]
;
then
find
"
$path
"
-mindepth
1
-delete
&> /dev/null
fi
path
=
$1
/tmp
if
[[
-d
$path
]]
;
then
find
"
$path
"
-mindepth
1
-delete
&> /dev/null
fi
fi
# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete
}
clean_up_mhwd_image
(){
msg2
"Cleaning up [%s]"
"
${
1
##*/
}
"
rm
-r
$1
/var
rm
-rf
"
$1
/etc"
rm
-f
"
$1
/cache-packages.txt"
}
lib/util-iso.sh
View file @
56b4672f
...
...
@@ -161,9 +161,9 @@ make_iso() {
touch
"
${
work_dir
}
/iso/.miso"
for
d
in
$(
find
"
${
work_dir
}
"
-maxdepth
1
-type
d
-name
'[^.]*'
)
;
do
if
[[
"
$d
"
!=
"
${
work_dir
}
/iso"
]]
&&
\
[[
"
${
d
##*/
}
"
!=
"iso"
]]
&&
\
[[
"
${
d
##*/
}
"
!=
"efiboot"
]]
&&
\
[[
"
$d
"
!=
"
${
work_dir
}
"
]]
;
then
[[
"
${
d
##*/
}
"
!=
"iso"
]]
&&
\
[[
"
${
d
##*/
}
"
!=
"efiboot"
]]
&&
\
[[
"
$d
"
!=
"
${
work_dir
}
"
]]
;
then
make_sqfs
"
$d
"
fi
done
...
...
@@ -240,7 +240,6 @@ make_image_custom() {
${
is_custom_pac_conf
}
&&
clean_pacman_conf
"
${
path
}
"
umount_image
clean_up_image
"
${
path
}
"
:
>
${
work_dir
}
/build.
${
FUNCNAME
}
msg
"Done [Desktop installation] (%s-image)"
"
${
profile
}
"
...
...
@@ -304,9 +303,7 @@ make_image_mhwd() {
configure_mhwd_drivers
"
${
path
}
"
umount_image
clean_up_mhwd_image
"
${
path
}
"
clean_up_image
"
${
path
}
"
:
>
${
work_dir
}
/build.
${
FUNCNAME
}
msg
"Done [drivers repository] (mhwd-image)"
fi
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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