-
Notifications
You must be signed in to change notification settings - Fork 0
/
rename.sh
38 lines (30 loc) · 2.45 KB
/
rename.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/bash
# Usage: find src -iname "*.java" -exec ./rename.sh {} \; -print
set -e
entities=net.dv8tion.jda.api.entities
files=$1
sed -i "s/import $entities\\.\\*;/import $entities\\.\\*;\nimport $entities.channel.*;\nimport $entities.channel.attribute.*;\nimport $entities.channel.middleman.*;\nimport $entities.channel.concrete.*;/" "$files"
sed -i "s/$entities.Channel/$entities.channel.Channel/" "$files"
sed -i "s/$entities.ChannelField/$entities.channel.ChannelField/" "$files"
sed -i "s/$entities.ChannelType/$entities.channel.ChannelType/" "$files"
sed -i "s/$entities.MessageChannel/$entities.channel.middleman.MessageChannel/" "$files"
sed -i "s/$entities.AudioChannel/$entities.channel.middleman.AudioChannel/" "$files"
sed -i "s/$entities.GuildChannel/$entities.channel.middleman.GuildChannel/" "$files"
sed -i "s/$entities.StandardGuildChannel/$entities.channel.middleman.StandardGuildChannel/" "$files"
sed -i "s/$entities.StandardGuildMessageChannel/$entities.channel.middleman.StandardGuildMessageChannel/" "$files"
sed -i "s/$entities.ICategorizableChannel/$entities.channel.attribute.ICategorizableChannel/" "$files"
sed -i "s/$entities.ICopyableChannel/$entities.channel.attribute.ICopyableChannel/" "$files"
sed -i "s/$entities.IGuildChannelContainer/$entities.channel.attribute.IGuildChannelContainer/" "$files"
sed -i "s/$entities.IInviteContainer/$entities.channel.attribute.IInviteContainer/" "$files"
sed -i "s/$entities.IMemberContainer/$entities.channel.attribute.IMemberContainer/" "$files"
sed -i "s/$entities.IPermissionContainer/$entities.channel.attribute.IPermissionContainer/" "$files"
sed -i "s/$entities.IPositionableContainer/$entities.channel.attribute.IPositionableContainer/" "$files"
sed -i "s/$entities.IThreadContainer/$entities.channel.attribute.IThreadContainer/" "$files"
sed -i "s/$entities.IWebhookContainer/$entities.channel.attribute.IWebhookContainer/" "$files"
sed -i "s/$entities.Category/$entities.channel.concrete.Category/" "$files"
sed -i "s/$entities.NewsChannel/$entities.channel.concrete.NewsChannel/" "$files"
sed -i "s/$entities.PrivateChannel/$entities.channel.concrete.PrivateChannel/" "$files"
sed -i "s/$entities.StageChannel/$entities.channel.concrete.StageChannel/" "$files"
sed -i "s/$entities.TextChannel/$entities.channel.concrete.TextChannel/" "$files"
sed -i "s/$entities.ThreadChannel/$entities.channel.concrete.ThreadChannel/" "$files"
sed -i "s/$entities.VoiceChannel/$entities.channel.concrete.VoiceChannel/" "$files"