sudo mkdir -p /mnt/uos20old /mnt/uos20new
sudo mount ~/Downloads/uniontechos-desktop-home-1030-amd64.iso /mnt/uos20old/
sudo rsync -av /mnt/uos20old/ /mnt/uos20new/sudo sync
sudo mkdir -p /mnt/uos20new/oem/deb
sudo cp xxx.deb /mnt/uos20new/oem/deb/
sudo apt updatesudo apt install xorriso
sudo nano /mnt/build-iso.sh
#!/bin/bashxorriso -as mkisofs -D -r -V "UOS 20" \-cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat \-no-emul-boot -boot-load-size 4 -boot-info-table \-eltorito-alt-boot --efi-boot boot/efi.img \-input-charset utf-8 \-o uos-20-home-amd64.iso uos20new
cd /mntsudo chmod +x build-iso.shsudo ./build-iso.sh
#!/bin/bash
[ -d /var/lib/deepin/developer-mode ] || mkdir -pv /var/lib/deepin/developer-mode
echo -n -E 1 > /var/lib/deepin/developer-mode/enabled
#发送桌面快捷方式
DESK_APPS_ARR=('deepin-manual' 'uos-browser')
for DESK_APP_ITEM in ${DESK_APPS_ARR[@]}; do
if [ -f /usr/share/applications/${DESK_APP_ITEM}.desktop ]; then
install -v -Dm644 /usr/share/applications/${DESK_APP_ITEM}.desktop/etc/skel/Desktop/
fi
done
常用图标
wwlocal.desktop
com.pantum.pantum.scanapp.desktop
com.qianxin.qaxsafe.desktop
360sd_usrstart.desktop
wps-office-wpp.desktop
wps-office-pdf.desktop
wps-office-et.desktop
cn.suwell.reader.desktop
com.qq.weixin.deepin.desktop
3:修改hosts脚本
简单版
echo "19.15.0.77 xtbgsafe.gdzwfw.gov.cn" >> /etc/hosts
echo "19.15.0.77 xtbg.gdzwfw.gov.cn" >> /etc/hosts
复杂版
# insert/update hosts entry
ip_address="19.15.0.77"
host_name="xtbgsafe.gdzwfw.gov.cn"
ip_address2="19.15.0.77"
host_name2="xtbg.gdzwfw.gov.cn"
# find existing instances in the host file and save the line numbers
matches_in_hosts="$(grep -n $host_name & $host_name /etc/hosts | cut -f1 -d:)"
host_entry="${ip_address} ${host_name} "
host_entry2="${ip_address2} ${host_name2}"
echo "Please enter your password if requested."
if [ ! -z "$matches_in_hosts" ]
then
echo "Updating existing hosts entry."
# iterate over the line numbers on which matches were found
while read -r line_number; do
# replace the text of each line with the desired host entry
sudo sed -i '' "${line_number}s/.*/${host_entry} & ${host_entry2} /" /etc/hosts
done <<< "$matches_in_hosts"
else
echo "Adding new hosts entry."
echo "$host_entry" | sudo tee -a /etc/hosts > /dev/null
fi