2019-06-12 16:47:58 -07:00
|
|
|
#!/usr/bin/env fish
|
2019-06-07 13:37:33 -07:00
|
|
|
|
2019-06-29 12:57:32 -07:00
|
|
|
# copy regular files
|
2019-06-12 16:47:58 -07:00
|
|
|
while read f t
|
2019-07-12 08:56:12 -07:00
|
|
|
eval set t $t
|
2020-01-07 08:36:01 -08:00
|
|
|
cp -vr "$t" "$f"
|
2019-06-12 16:47:58 -07:00
|
|
|
end < files
|
2019-06-07 13:37:33 -07:00
|
|
|
|
2019-06-29 13:17:39 -07:00
|
|
|
# copy font configs
|
2019-11-07 04:20:22 -08:00
|
|
|
function copy-confd -a path out
|
|
|
|
find $path/*.conf > $out/conflist
|
2019-06-29 13:17:39 -07:00
|
|
|
|
2020-01-22 11:11:26 -08:00
|
|
|
rm $out/*.conf
|
2019-11-07 04:20:22 -08:00
|
|
|
for f in $path/*.conf
|
|
|
|
if not test -L "$f"
|
2020-01-07 08:36:01 -08:00
|
|
|
cp -v "$f" "$out"
|
2019-11-07 04:20:22 -08:00
|
|
|
end
|
2019-07-12 08:56:12 -07:00
|
|
|
end
|
2019-06-29 13:17:39 -07:00
|
|
|
end
|
|
|
|
|
2019-11-07 04:20:22 -08:00
|
|
|
copy-confd /etc/fonts/conf.d system/fonts/
|
|
|
|
copy-confd /etc/X11/xorg.conf.d system/xorg/
|
|
|
|
|
2019-06-29 12:57:32 -07:00
|
|
|
# copy vim package names
|
|
|
|
tree -dL 3 ~/.vim/pack > vim/packages
|
|
|
|
|
|
|
|
for repo in ~/.vim/pack/*/*/*
|
2019-07-12 08:56:12 -07:00
|
|
|
pushd $repo
|
2020-01-07 08:36:01 -08:00
|
|
|
echo -n (basename $PWD)" " | tee /dev/stderr
|
2019-08-06 14:02:21 -07:00
|
|
|
if test -d .git
|
|
|
|
echo "<"(git config --get remote.(git rev-parse --abbrev-ref "master@{upstream}" | sed 's/\(.*\)\/.*/\1/').url)">"
|
|
|
|
else
|
|
|
|
echo "<no url>"
|
|
|
|
end
|
2019-07-12 08:56:12 -07:00
|
|
|
popd
|
2019-07-04 21:25:28 -07:00
|
|
|
end | sort > vim/package_repos
|
2020-01-07 08:36:01 -08:00
|
|
|
echo
|
2019-06-29 12:57:32 -07:00
|
|
|
|
2019-07-22 03:53:26 -07:00
|
|
|
# erase passwords
|
2020-01-07 08:36:01 -08:00
|
|
|
function erasepw -a inp out
|
|
|
|
sed -i "$inp" "$out"
|
|
|
|
echo "$out"
|
|
|
|
end
|
|
|
|
erasepw 's/password>.*<\//password>password removed<\//g' network/icecast.xml
|
|
|
|
erasepw 's/password\(\s*\)".*"/password\1"password removed"/g' network/mpd.conf
|